Workspace instructions (AGENTS.md) from parent/shared repo are never injected in the web app; home patch cannot configure the per-session plugin #519
Replies: 3 comments
|
Related — cross-linking a discussion I just opened: #5333 (#5333) proposes a native auto-load of a user's |
Update: Workaround working in productionWe solved this by creating a custom agent preset that explicitly loads both
Key notes:
Not a full fix for the discovery logic, but it's been stable for us. Posting in case it helps others hitting the same nested-repo issue. |
|
Thanks for posting the working workaround — overriding the per-session |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Summary
In the web app, the workspace-instruction baseline only ever includes AGENTS.md files from the innermost project root down to the session cwd. When repos are nested (e.g. GitHub/ is a repo containing GitHub/Harness/ as another repo), the shared AGENTS.md at the parent repo root is never discovered, because project-root discovery stops at the first directory containing a .git marker walking up from the cwd.
Additionally, the documented configuration seam for this plugin — the home-level patch $DSH_HOME/cordis.patch.yml — is inert in the web app: the host-plane agent-instructions row is disabled by the web-app bundle, and the instance that actually composes session baselines is mounted per-session from the agent preset, which the home patch cannot reach.
Expected behavior
A session whose cwd is C:\Users\manue\Documents\GitHub\Harness should receive a baseline containing both GitHub/AGENTS.md (shared rules) and Harness/AGENTS.md (repo-local rules), since both are ancestors of the cwd.
Actual behavior
The baseline contains only Harness/AGENTS.md. The session log shows a single Instructions from: AGENTS.md section with no budget-omission notice, confirming the parent file was never discovered (not merely truncated).
Root cause
Reproduction
Workaround (verified)
Create a user preset that copies the shipped code preset and overrides the agent-instructions row:
yaml
name: '@deepseek-ai/dsh-agent-instructions'
config:
maxBytes: 131072
projectRootMarkers: ['.dsh-root']
Place a .dsh-root marker file at the shared root (GitHub/), and set agent-presets.default: in $DSH_HOME/settings.yaml (hot-reloaded, no restart needed). Sessions then receive both AGENTS.md files.
Suggested fixes
Additional notes
All reactions