fix(code-agent): scope the act-with-tools directive to coding requests - #451
Open
lucifer78907 wants to merge 1 commit into
Open
fix(code-agent): scope the act-with-tools directive to coding requests#451lucifer78907 wants to merge 1 commit into
lucifer78907 wants to merge 1 commit into
Conversation
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.
Type of Change
Description
Split out of #<forge_bugs PR number> at reviewer request — this is an
LLM-behavior change and belongs on its own.
codeAgentDirectiveopened with an unconditional instruction:The system prompt is built once at startup and never sees the incoming
message, so that rule also governed conversational turns. A plain "Hi" left
the model no legal move: it had to produce a tool call, so it discharged the
obligation through the nearest write tool and saved its greeting to a
file.
Summary
coding rule was applied to greetings and small talk.
via a write tool — turning "Hi" into a file on disk.
conversation an explicit, legal text-only path.
Changes
forge-cli/runtime/runner.go—codeAgentDirectivegains a CONVERSATIONcarve-out;
FORBIDDEN/REQUIREDsections are now explicitly qualified"(on coding requests)". A comment records why the carve-out is
load-bearing, so a future edit doesn't restore the unconditional form.
forge-skills/local/embedded/code-agent/SKILL.md— mirrors the samedistinction, with a "CONVERSATION vs CODING WORK (read this first)"
section, and qualifies absolute rule 1.
The acting-over-narrating behaviour on actual coding work is unchanged:
"Let me patch that" with no tool call is still forbidden, scaffold →
write → run is still required in one turn, and the exploration rules are
untouched.