Skip to content

agy-cli 0.1.114: a home working directory is not added to agy's workspace, so the client's largest tools stay (#1405) - #1469

Open
wangbingnan136 wants to merge 2 commits into
magpie-community:mainfrom
wangbingnan136:codex/agy-cli-home-workdir
Open

wangbingnan136 wants to merge 2 commits into
magpie-community:mainfrom
wangbingnan136:codex/agy-cli-home-workdir

Conversation

@wangbingnan136

Copy link
Copy Markdown

Fixes #1405.

Summary

-    if (this.workDir) args.push("--add-dir", this.workDir)
+    if (this.workDir && path.resolve(this.workDir) !== path.resolve(os.homedir())) args.push("--add-dir", this.workDir)

With the home directory in its workspace, agy loads what is there as customizations that share the tools' 20,000-token budget, and drops the client's largest tools (Bash, Read, Agent) to fit. The reporter verified this patch locally and re-applied it after three auto-updates. A home working directory is still where the client's tools run, and the model is still told so. Only agy's workspace leaves it out.

Evidence

New test in test/repeat-batch.mjs: plugins#1405: a home working directory is not added to agy's workspace; a folder in it is

  • Before (upstream index.mjs via AGY_BRIDGE_TEST_INDEX): fails, and the spawn args carry --add-dir <home>
    After: pass. A folder inside home is still added, and the prompt still names the home directory as where the tools run.
  • bun test ./agy-cli.test.mjs, bun scripts/check.mjs, bun scripts/bumped.mjs upstream/main: pass

Merge Danger

Door: two-way.

Blast Radius: narrow. Only sessions whose working directory is exactly the home directory change. agy's own built-in file tools, which the bridge denies anyway, no longer see home as a workspace.

Version: 0.1.113 → 0.1.114.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agy-cli 0.1.103: 工作目录为家目录时 --add-dir ~ 让 agy 丢弃最大的客户端工具(Bash/Read 等,#1166 后续)

2 participants