Problem
The agent inside the container may create scratch directories or temporary files during execution. Forge currently only excludes task.json (cleaned up at runtime). If git picks up other agent-internal paths, they can appear in commits or dirty the workspace state.
Proposed solution
Before spawning the container, append known agent-internal paths to {workspace}/.git/info/exclude:
This is a local-only write (not a git commit) and has no effect on the remote. It ensures git status and git add inside the container never accidentally pick up forge metadata.
Extend the list if other agent working directories are identified over time.
Reference
Learned from fullsend: internal/cli/run.go:excludeAgentWorkingDirs() — appends .agentready/ and .fullsend-workspace/ to .git/info/exclude before agent runs.
Problem
The agent inside the container may create scratch directories or temporary files during execution. Forge currently only excludes
task.json(cleaned up at runtime). If git picks up other agent-internal paths, they can appear in commits or dirty the workspace state.Proposed solution
Before spawning the container, append known agent-internal paths to
{workspace}/.git/info/exclude:This is a local-only write (not a git commit) and has no effect on the remote. It ensures
git statusandgit addinside the container never accidentally pick up forge metadata.Extend the list if other agent working directories are identified over time.
Reference
Learned from fullsend:
internal/cli/run.go:excludeAgentWorkingDirs()— appends.agentready/and.fullsend-workspace/to.git/info/excludebefore agent runs.