Skip to content

fix: require complete captain-facing final responses - #4779

Merged
kunchenguid merged 4 commits into
mainfrom
fm/fm-final-response-must-carry-key-info-r1
Sep 17, 2026
Merged

kunchenguid merged 4 commits into
mainfrom
fm/fm-final-response-must-carry-key-info-r1

Conversation

@kunchenguid

@kunchenguid kunchenguid commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Intent

Captain ask (minimal instruction tweak, ALL harnesses): the captain may not read mid-turn messages. When the agent responds, the FINAL response message must include ALL key information the captain needs from the whole turn - even if it was already said in a mid-turn message.

Failure shape this session: after supervision-branch processing, MAIN often put substance BEFORE fm_branch_processed and only a short trailing line after tools (e.g. "Captain, shipshape." or "Awaiting your merge call." without the PR URL). The captain's live UI showed only the short line; the mid-turn / pre-tool text was easy to miss or Calm-hidden as working notes.

This GENERALIZES the already-landed #4738 (which covered shipshape-vs-outcome and PR-URL-in-visible-reply for branch-outcome turns): the rule here is that the FINAL message is the captain-facing packet for the WHOLE turn, on EVERY harness - not only branch-outcome turns.

What Changed

  • Require every harness’s final response to recap all key turn outcomes, consequences, decisions, and relevant URLs or identifiers.
  • Clarify that final recaps preserve separate per-decision asks and must repeat PR URLs for review or merge requests.
  • Point Grok Bot instructions to the shared final-response contract in AGENTS.md.

Risk Assessment

✅ Low: The change is a small, well-bounded documentation update that satisfies the final-response requirement and resolves the prior no-batching ambiguity.

Testing

After correcting an unsupported Pi model selection, I drove live Pi and Grok turns through real tool calls: both final responses repeated key pre-tool information, and Pi preserved separate decision asks while recapping both outstanding decisions. All targeted scenarios passed, with transcripts captured as evidence.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
A Pi branch-outcome turn repeats the completed fix, full PR URL, and merge request after a tool call ✅ pass live Pi natural branch-outcome final-response transcript
A Grok non-branch turn repeats the missing credential and deployment consequence after a tool call ✅ pass live Grok natural non-branch blocker final-response transcript
Two unrelated decisions receive separate asks while the final visibility recap retains both decisions and the PR URL ✅ pass live Pi separate decisions and final visibility recap transcript
Evidence: Pi natural branch-outcome final-response transcript

Source: Pi natural branch-outcome final-response transcript

Live Pi transcript — natural branch-outcome turn
================================================
ASSISTANT: Captain, the authentication fix is complete and ready for review: https://github.com/example/harbor/pull/314. Would you like me to merge it?
TOOL CALL: bash {"command":"printf \"branch processed\\n\""}
TOOL RESULT: bash => branch processed

ASSISTANT: Captain, the authentication fix is complete and ready for review: https://github.com/example/harbor/pull/314. Would you like me to merge it?
Evidence: Grok natural non-branch blocker final-response transcript

Source: Grok natural non-branch blocker final-response transcript

Live Grok transcript — natural non-branch blocker turn
=====================================================
ASSISTANT: Production deployment is blocked because credential `DEPLOY_TOKEN` is missing. Please provide `DEPLOY_TOKEN` so the live product check can continue.
TOOL CALL: run_terminal_command {"command":"printf \"credential checked\\n\"","description":"Print credential checked confirmation line"}
TOOL RESULT: exit: 0
credential checked

ASSISTANT: Credential check ran successfully (`credential checked`). Deployment is still blocked on the missing `DEPLOY_TOKEN`; once you provide it, the live product check can proceed.
Evidence: Pi separate decisions and final visibility recap transcript

Source: Pi separate decisions and final visibility recap transcript

Live Pi transcript — separate asks plus final visibility recap
==============================================================
ASSISTANT: Captain, should I merge the ready authentication PR at https://github.com/example/harbor/pull/314?

Approval is needed now. Options: **merge** or **wait**. I recommend **merge** because all checks passed.
TOOL CALL: bash {"command":"printf \"first decision recorded\\n\""}
TOOL RESULT: bash => first decision recorded

ASSISTANT: Captain, should the dashboard use **light** or **dark** mode?

Implementation is waiting on this choice. I recommend **dark** for accessibility.
TOOL CALL: bash {"command":"printf \"second decision recorded\\n\""}
TOOL RESULT: bash => second decision recorded

ASSISTANT: Captain, two separate decisions remain outstanding:

1. Authentication PR: **merge or wait**  
   https://github.com/example/harbor/pull/314

2. Dashboard theme: **light or dark mode**

Each requires its own decision.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • 🚨 GROK_BOT.md:31 - The new instruction to follow AGENTS.md section 9 conflicts with GROK_BOT.md:27. The authoritative intent requires the final message to include every needed decision from the whole turn, but line 27 requires one message per decision and forbids batching unrelated decisions. If two workers simultaneously need separate merge approvals, the final message must either omit the earlier decision or violate the no-batching rule. Please authorize clarifying that the standalone final packet may recap all decisions, or otherwise define precedence.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
A Pi branch-outcome turn repeats the completed fix, full PR URL, and merge request after a tool call ✅ pass live Pi natural branch-outcome final-response transcript
A Grok non-branch turn repeats the missing credential and deployment consequence after a tool call ✅ pass live Grok natural non-branch blocker final-response transcript
Two unrelated decisions receive separate asks while the final visibility recap retains both decisions and the PR URL ✅ pass live Pi separate decisions and final visibility recap transcript
  • git diff --unified=80 5e879badbd1ecd3aab3a0eeb45e9502362ffd6cc..437c56d48edd2d1d44fc75053ebc4df6831eea23
  • pi --provider openai-codex --model gpt-5.6-sol --mode json --no-session --no-extensions --no-skills --tools bash --approve -p <natural branch-outcome prompt>
  • grok --cwd "$PWD" --single <natural non-branch blocker prompt> --output-format streaming-messages-json --permission-mode bypassPermissions --tools Bash --max-turns 3
  • pi --provider openai-codex --model gpt-5.6-sol --mode json --no-session --no-extensions --no-skills --tools bash --approve -p <separate-decisions adversarial prompt>
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid
kunchenguid force-pushed the fm/fm-final-response-must-carry-key-info-r1 branch from af6268c to 437c56d Compare September 17, 2026 22:16
@kunchenguid
kunchenguid merged commit 8d9d5da into main Sep 17, 2026
12 of 14 checks passed
@kunchenguid
kunchenguid deleted the fm/fm-final-response-must-carry-key-info-r1 branch September 17, 2026 22:58