fix(context): refresh workspace state after tool-driven file changes
还没有人认领这个 Issue。
评估
调研方向
Trace how MiniAgent constructs WorkspaceContext and the generated prompt prefix, then follow the write_file, patch_file, and run_shell operations that can mutate the workspace. Check how later model turns obtain git status, branch state, commits, documentation, and repository instructions. Done means a mutation is visible on the next model turn, static prompt content is not needlessly rebuilt, and regression tests cover the sequence.
由索引模型根据 Issue 内容生成。
描述
Problem
"WorkspaceContext" and the generated prompt prefix are constructed once when "MiniAgent" starts. However, tools such as "write_file", "patch_file", and "run_shell" can mutate the workspace during the same session.
As a result, subsequent model turns can receive stale information about:
- "git status"
- current branch state
- recent commits
- project documentation
- repository-level instructions
For example, the initial workspace may be clean, but after "write_file" creates a file, the prompt can still report the original clean status.
Expected behavior
After workspace-mutating operations, the agent should either:
- refresh the affected workspace context, or
- explicitly separate immutable context from dynamically refreshed state.
The refresh should avoid rebuilding unnecessary static prompt content on every turn.
Acceptance criteria
- "git status" reflects changes made during the current session.
- Changes made through "write_file", "patch_file", and shell commands are visible to later model turns.
- Project documentation changes are reflected when appropriate.
- Existing prompt/cache behavior is preserved as much as possible.
- Add regression tests covering a workspace mutation followed by another model turn.
- 主要语言
- Python
- 星标
- 1.2k
- 派生
- 218
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rasbt/mini-coding-agent 的其他 Issue
-
fix(list_files): report when directory entries are truncated可能已有人在做 @Oscar-Williams 于 19 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
rasbt/mini-coding-agent#17 ·
-
难度 3/5 1-2 天 新手友好度 72/100
rasbt/mini-coding-agent#16 ·
-
难度 4/5 3-5 天 新手友好度 35/100
rasbt/mini-coding-agent#14 · 2 个 reaction ·
查看 rasbt/mini-coding-agent 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
EchoTools/nevr-runtime#651 ·
维护者通常 1 天内回复
-
bug frontend rt sev-3
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
noontide-co/mainbranch#1211 · 1 条评论 ·
维护者通常 1 天内回复
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adapters未关闭triage
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复