Repository navigation
fix: an agent in a source project is told its definition is the author's working copy to edit - #988
Merged
Merged
Conversation
…r's working copy to edit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #919. Option 2 of the issue.
Behavior
When the agent's working directory is not its definition's directory (every local instance since #918), the prompt now says one of two things about the definition, by what the definition is:
dev,invoke,schedules runon a project): "Your definition is in X, the author's working copy: SYSTEM.md, AGENTS.md, skills/ and prompts/ are re-read for every message, so an edit to them takes effect on the next one, while src/ and the configuration are read when you start and need a restart."start, a deployment, an embeddedopenAgent(definition)): unchanged, "which you read and do not change."The distinction is
AgentDefinition.source, set only byloadSourceDefinitionand never written into a built entry, so the prompt does not compare paths.Verification
npm run lint,npm run typecheck,npm test(195 files, 2389 passed, 3 skipped). New tests: the source wording through a real open with a separate workdir, and the built wording;build.test.tsasserts a built definition has nosource. Replacing the wiring withsource: falsefails the first.Known limitations
Under
devthe supervisor restarts the process whensrc/or the configuration change, so the "need a restart" clause is accurate there but one-shot commands (invoke) only see such a change on their next run.