Skip to content

Daemon: the opinions that leaked in move out to clients - #447

Merged
lydakis merged 6 commits into
mainfrom
claude/project-thread-t3jda4
Oct 30, 2026
Merged

lydakis merged 6 commits into
mainfrom
claude/project-thread-t3jda4

Conversation

@lydakis

@lydakis lydakis commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Requested by George · project thread

What

George asked whether opinions had leaked into the daemon, and if so to remove or rework them. The audit found ten; this PR fixes the ones that move cleanly out to clients. The approver move (item 10) and the sandbox's protected names (item 2) follow as their own PRs. Item 7 (prompts passed to providers verbatim) stays as it is, because Codex does the same.

  • Terminal names leave the daemon (item 1). The daemon no longer strips REX_*, TMUX*, HERDR_* or CMUX_* from tool shells itself. agent_client::TERMINAL_PLACES lists them, and the CLI that starts the daemon passes each one as --shell-exclude, the same way as the [shell_environment_policy] excludes from Tool shells: Codex's opt-in shell environment excludes #412. Companions still inherit them.
  • What counts as a secret is the client's to name (item 3). The daemon still redacts the credential values it holds. Its field-name and private-key scan now runs on names the client passes at daemon start: serve --redact-field NAME and --redact-block LABEL. The CLI passes agent_client::SECRET_FIELDS (main's list) and PRIVATE KEY, so redaction behaves as it did before (George's pick).
  • No advice in model-facing text (items 4 and 5). The summarizer request states its byte bound without "be shorter when possible". The shell and wait tool descriptions state facts, with no detach or until-loop advice.
  • delivery is required on submit (item 6). The daemon no longer picks reject for the caller. A submit without it gets invalid_delivery, with the valid names in its facts. The CLI defaults to AGENT_DELIVERY, then reject. Sonny sends queue, steer or reject itself. PROTOCOL stays at 24, and docs/RUST_PROTOTYPE.md's "Protocol version 24" paragraph notes that delivery is required.
  • Round bound is a bot setting (item 8). The fixed MAX_ROUNDS = 200 becomes the bot's max_rounds setting (--max-rounds), unbounded when unset. 0 is refused.
  • CLI preamble is facts only (item 9). The naming, reviewer and "ask this way" lines leave the preamble. Since Sonny: role files get byte budgets, the lead's repeated rules merge, and a role eval #440, Sonny's role files already hold each of them: naming, reviewers start no agents, ask a fork before steering, and your reply reaches your lead. So neither role file changes. The detach and wait-loop advice that came out of the tool descriptions is left to the model and memory.
  • Enforcement. src/AGENTS.md states the rule as a short checklist. tests/daemon_knows_no_client.rs fails when daemon source outside the CLI's own files names a client, terminal or tool (Sonny, Herdr, cmux, tmux, Rex, lookout); tests may still name them.

Tests and bench drivers send delivery. The Python socket clients default it to reject. Tests that count 200 rounds set max_rounds: 200.

Speed and lightness

Nothing new runs on a turn's path. Redaction does the same work as on main, with the names read from the daemon's start flags instead of a constant. The round bound is read from settings the turn already holds. The terminal excludes reuse the --shell-exclude list the daemon already applies when it spawns a shell. There is no new store work per turn.

Checks

  • cargo test --workspace, cargo clippy --workspace --all-targets -D warnings, cargo fmt --check
  • Python runtime suite, including test_approvals, test_wait, test_daemon, test_acp, test_served, test_bench, test_context_eval and test_turn_compaction

🤖 Generated with Claude Code

https://claude.ai/code/session_013jkdGCtBZA4DWhW2khSZ4P

@lydakis lydakis self-assigned this Oct 30, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T06:57:05.481337Z 40dc64e New commits
🔒 Security Review ✅ Completed 2026-10-30T07:00:43.944216Z 40dc64e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0451c1b9aa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tools.rs Resolved
@lydakis
lydakis force-pushed the claude/project-thread-t3jda4 branch 2 times, most recently from 1bae543 to 8618d15 Compare October 30, 2026 06:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1bae5437bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sonny/agents/task.md Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb96cf9270

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/client.rs Resolved
- The daemon no longer names the terminals Sonny runs in: the CLI that
  starts it leaves TERMINAL_PLACES (Rex, tmux, Herdr, cmux) out of tool
  shells through --shell-exclude.
- Tool output is redacted only of the credentials the daemon holds; what
  else counts as a secret is a client's judgement.
- The summarizer request states its byte bound without style advice, and
  the shell and wait descriptions state facts without advice or CLI flags.
- delivery is a required submit field; the CLI and Sonny always send it.
- A turn's model-call bound is the bot's max_rounds setting (--max-rounds),
  unbounded when unset, in place of a fixed 200.
- The CLI preamble is runtime facts again; workflow rules live in Sonny's
  role files (#440).
- src/AGENTS.md states the rule, and tests/daemon_knows_no_client.rs fails
  on a client, terminal or tool name in daemon source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGCtBZA4DWhW2khSZ4P
…immed text

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGCtBZA4DWhW2khSZ4P
… files keep the preamble's workflow lines

- serve --redact-field NAME and --redact-block LABEL have the daemon redact
  those values from tool output; the CLI that starts it passes
  agent_client::SECRET_FIELDS and PRIVATE KEY, so redaction is as before.
- task.md keeps the reviewer rule and the detach and wait-loop advice the
  tool descriptions dropped; lead.md asks a fork before steering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGCtBZA4DWhW2khSZ4P
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGCtBZA4DWhW2khSZ4P
…duplicates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGCtBZA4DWhW2khSZ4P
The CLI passes --redact-field once per name, which serve refused as given
twice, so a daemon the CLI started exited before it served.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGCtBZA4DWhW2khSZ4P
@lydakis
lydakis force-pushed the claude/project-thread-t3jda4 branch from 8a80a03 to 40dc64e Compare October 30, 2026 06:54
@lydakis
lydakis merged commit 54d80fc into main Oct 30, 2026
5 checks passed
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.

2 participants