Skip to content

fix: an agent in a source project is told its definition is the author's working copy to edit - #988

Merged
kid7st merged 1 commit into
mainfrom
fix/dev-prompt-definition-editable
Nov 9, 2026
Merged

kid7st merged 1 commit into
mainfrom
fix/dev-prompt-definition-editable

Conversation

@kid7st

@kid7st kid7st commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Source project (dev, invoke, schedules run on 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."
  • Built package (start, a deployment, an embedded openAgent(definition)): unchanged, "which you read and do not change."

The distinction is AgentDefinition.source, set only by loadSourceDefinition and 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.ts asserts a built definition has no source. Replacing the wiring with source: false fails the first.

Known limitations

Under dev the supervisor restarts the process when src/ 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.

@kid7st
kid7st requested a review from Sukitly as a code owner November 9, 2026 09:28
@kid7st kid7st self-assigned this Nov 9, 2026
@kid7st
kid7st enabled auto-merge (squash) November 9, 2026 09:31
@github-actions github-actions Bot added the bug Something isn't working label Nov 9, 2026
@kid7st
kid7st merged commit 579b19f into main Nov 9, 2026
12 checks passed
@kid7st
kid7st deleted the fix/dev-prompt-definition-editable branch November 9, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev prompt tells the agent not to change its definition after the instance root moved

1 participant