fix(context): refresh workspace state after tool-driven file changes
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rasbt/mini-coding-agent
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rasbt/mini-coding-agent#17 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
rasbt/mini-coding-agent#16 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rasbt/mini-coding-agent#14 · 2 reactions ·
All issues in rasbt/mini-coding-agent
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100