Skip to content

fix(code-agent): scope the act-with-tools directive to coding requests - #451

Open
lucifer78907 wants to merge 1 commit into
initializ:mainfrom
lucifer78907:fix/code-agent-prompt
Open

fix(code-agent): scope the act-with-tools directive to coding requests#451
lucifer78907 wants to merge 1 commit into
initializ:mainfrom
lucifer78907:fix/code-agent-prompt

Conversation

@lucifer78907

Copy link
Copy Markdown
Contributor

Type of Change

  • Bug fix
  • New feature
  • Enhancement / refactor
  • New skill
  • Documentation
  • CI / build

Description

Split out of #<forge_bugs PR number> at reviewer request — this is an
LLM-behavior change and belongs on its own.

codeAgentDirective opened with an unconditional instruction:

Every response MUST include tool calls. NEVER respond with only text.

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

  • The mandate was unconditional but the prompt is message-agnostic, so a
    coding rule was applied to greetings and small talk.
  • With no text-only response permitted, the model satisfied the constraint
    via a write tool — turning "Hi" into a file on disk.
  • Fix: scope the acting-over-narrating pressure to coding requests, and give
    conversation an explicit, legal text-only path.

Changes

  • forge-cli/runtime/runner.gocodeAgentDirective gains a CONVERSATION
    carve-out; FORBIDDEN / REQUIRED sections 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 same
    distinction, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant