Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc3d2ff4ff
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3589ed5b2
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 372e17cfba
ℹ️ 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".
…r back once when it ends A gated `workflow` tool, answered by Sonny's tool host. Its script language is Claude Code's dynamic workflow language, name for name: an `export const meta` header, agent(), parallel(), pipeline(), phase(), log(), args, budget and workflow() one level deep, with the same return values and limits. The script runs in the QuickJS Sonny already embeds; Date.now(), Math.random() and new Date() throw so a run replays the same way. Each agent() is an ordinary bot one generation below the caller, made by the tool host over its daemon connection with the caller's folder (or a worktree), rules, skills and gates. Workers have no tools that start other agents and stay out of /status, sky, switch, the lookout and start_task. A schema goes as the worker turn's strict output_schema. The run's journal lives beside the store; resume_from_run_id answers unchanged calls from an earlier run, keyed by content. The caller gets one queued message when the run ends, and a tool host that restarts runs unfinished runs again. On by default under [sonny.workflows] (enabled, concurrency, max_agents, max_runs). Ships with a skill, docs, and an AGENTS.md clause saying a script an agent writes for one job is not a workflow builder. Co-Authored-By: Claude <noreply@anthropic.com>
- Check the stop and the budget once a worker slot is free, so calls queued behind it start no worker after the budget is spent. - A reply the wait cut is read whole from history; a lost connection replays the call, and an unreadable reply is an error, never the cut text kept as the value. - Hold a place among max_runs from the check until the run starts, so calls at once cannot pass it together. - A required property whose schema takes null may be null. - result.json is written whole or not at all; one that does not parse leaves the run to run again from its journal. - The budget_tokens parameter says a run has none by default. Co-Authored-By: Claude <noreply@anthropic.com>
- budget.spent() counts each call as the script reaches it, answers from the journal included, so a replay takes the same branches; admission still goes by what the run truly spent. - A worker whose wait lost its connection stays known, so a stop then interrupts it; a run that ends with no connection interrupts its leftover workers on a new one. - An optional enum or const property goes as anyOf with null, which its values would otherwise hold out. - What a workflow's worker asks the person comes to its project's lead's window, while it runs and ten minutes after, though it has no row. Co-Authored-By: Claude <noreply@anthropic.com>
- A run picked up again knows its workers' worktrees from git, so its end still takes them away or says what stays. - Its end reports a worktree that cleanup refused to take, and where it is. - Telling the caller retries until the daemon takes it, in its own task, so a daemon away for long still hears; the run leaves the host's runs. - Optional nulls are left out of objects a local $ref or an anyOf/oneOf branch describes, as of inline ones. Co-Authored-By: Claude <noreply@anthropic.com>
372e17c to
ee10195
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee10195440
ℹ️ 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".
- A worker's folder in its worktree is checked as a task's is: each folder down to it opened without following a link, and it, followed, still inside the worktree. - Of an anyOf/oneOf, the branch chosen to leave optional nulls out is one whose consts and enums hold the values given, not only its names. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 738bb2a053
ℹ️ 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".
- A worker is known as live from before its submission is sent, so a stop that cancels the call while the daemon takes it still interrupts its turn, found by its listing. - The end message's list of what stays is bounded, the rest counted and left to result.json, so a large run's message always fits. Co-Authored-By: Claude <noreply@anthropic.com>
A new go after a lost connection starts with one slot fewer for each worker still running from before; that worker's call takes its slot back when replay reaches it, and gives it to the run when it ends, so at_once holds across the reconnect. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ee9aa0bc3
ℹ️ 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".
…cleaned up A worker is known to the run before its worktree is made, and the making holds a lock the run's end waits for, so a stop during it still takes the worktree away or reports it. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a61999d549
ℹ️ 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".
Reading a worker's whole reply goes newest first; an item the daemon could not hand back before the reply is found may be the reply, so the call fails with why rather than take an older message for it. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 227b9a6138
ℹ️ 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".
…t is spent The budget stops new submissions only: a call whose worker survives from before a lost connection reattaches to its turn whatever has been spent, as it would have finished had the connection held. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efa49626c8
ℹ️ 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".
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c179cab021
ℹ️ 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".
…heir branch Co-Authored-By: Claude <noreply@anthropic.com>
… resume Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a48f3cf1f4
ℹ️ 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".
…o answer from Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48f4469ad0
ℹ️ 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".
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 408069db88
ℹ️ 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".
… its own turn Co-Authored-By: Claude <noreply@anthropic.com>
…ts never exceed at_once Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6079011e9b
ℹ️ 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".
…still counts its tokens Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68fdfb6d60
ℹ️ 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".
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46c8310ddf
ℹ️ 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".
…null as a whole A worker the call made before a restart is inspected and recovered even when its profile can no longer be read, so its turn is still awaited and stopped. An optional property may be null as an alternative to its whole schema, so no enum, const or union inside it holds null out. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0da15ccda9
ℹ️ 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".
Loosening no longer picks one branch of a choice. Every branch the reply may fit counts, and fits() only rules out what it checks, so the branch the reply truly answers is always among them: a null leaves only when none of them requires that property. A whole number written with a point is an integer. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73da0a8b01
ℹ️ 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".
A run's workers take the model, effort and folder of the turn that called workflow, as an ordinary tool call does, not the bot's stored defaults. At a run's end, the output tokens of turns whose calls were never answered join its count. Cleanup asks the run's own daemon. Replay answering recorded calls at once is written down. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b1268828b
ℹ️ 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".
…e it works A request the client could not write is lost as the connection is, so its call is replayed and its worker stays known. The tokens of calls never answered are read on the connection that last worked, or a new one, until they are read. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77a22cfc7e
ℹ️ 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".
A choice is loosened by one alternative at a time, the first whose result the schema holds valid, never by requirements mixed from several, and the reply is then checked whole against the schema, as Claude Code checks a structured reply. A reply that misses is asked once more, as before. The hand-written fit check goes. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed4edf6344
ℹ️ 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".
As a task in a worktree is: its instructions come from the folder the run works in, with that folder's parents and untracked rules, while it works in its own worktree. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b629651ad8
ℹ️ 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".
An interrupted turn may still be counting what it spent, so its usage is read from its wait result once it has ended, before the run's result is written and its worktrees are taken away. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a217e26ae
ℹ️ 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".
…l taken The slot held for a worker a lost connection left running comes back when its call ends or when its turns end, whichever is first, so a script that has not reached it yet never waits on it. A caller whose queue is full is told the run's end once there is room. Optional properties inside allOf are loosened too. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 000611b907
ℹ️ 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".
allOf, not, if/then/else, prefixItems and the other keywords strict structured output does not take are refused when agent() is called, at any depth, rather than sent as a schema no reply can meet. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a274b62fc
ℹ️ 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".
Strict output takes a choice as anyOf, and branches made to require every property may no longer exclude each other, so a oneOf is sent as anyOf and the reply is held to the oneOf itself when it is checked. A level with both anyOf and oneOf is refused at the call. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 271053377a
ℹ️ 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".
A $ref is taken alone, with at most a description or title, as strict output takes it; one with constraints beside it is refused when agent() is called rather than loosened as its target alone. Co-Authored-By: Claude <noreply@anthropic.com>
Requested by George · project thread
What
A gated
workflowtool, answered by Sonny's tool host. An agent writes a short JavaScript program; eachagent()call in it runs a fresh agent, and the caller hears back once, in one queued message, when the run ends. The script language is Claude Code's dynamic workflow language, name for name, so a script written for one runs on the other:export const meta = {...}header, a pure literal (name,description, optionalwhenToUse,phases)agent(prompt, {label, phase, schema, model, effort, isolation: 'worktree', agentType}): a string, the schema's object, ornullwhen the agent failsparallel(thunks)(a barrier, never rejects),pipeline(items, ...stages)with(prev, item, index),phase(),log(),args,budget {total, spent(), remaining()},workflow(nameOrRef, args)one level deepDate.now(),Math.random()and arglessnew Date()throw; at most min(16, CPUs − 2) agents at once, 1,000 per run, 4,096 items perparallel/pipelineTool parameters:
script|script_path|name(saved in.agents/workflows/NAME.js, the project's or~/),args,budget_tokens,resume_from_run_id,stop.How
<project>.wf-<run>-<key>), made in-process over the host's daemon connection, with the calling turn's model and effort: the caller's folder or a worktree, the source folder's rules, skills, memory, profile (agentType), sandbox and gates. They get memory, exec, browser and desktop only: nothing that starts agents. They are kept out of /status, sky, switch, the lookout's task watch andstart_task.[daemon] max_depthis checked before anything is made.output_schema, as Codex sends one (aoneOfgoes asanyOf). Optional properties go as nullable and come back left out, one alternative of a choice at a time. The reply is then checked whole against the schema with thejsonschemacrate (default features off, so no remote refs), as Claude Code checks a structured reply. A reply that does not fit is asked again once on the same worker, thennull. Keywords strict output does not take (allOf,not,if,prefixItems, a$refwith constraints beside it, and the like) are refused at the call.<store>.workflows/<run>/:run.json,script.js, nested scripts as first read,events.jsonl(phases, logs, submissions, stops, each agent's value or why it was null),result.json. Request ids come from the run and the call's key, so a replay never submits twice.resume_from_run_idanswers every unchanged call from the earlier run without a model call.stopwith a run id, by its caller or the project's lead, interrupts its running and queued turns until the daemon has heard; the caller still hears how it ended, with the tokens of calls never answered counted. Leftover worktrees are removed at the end; branches with commits are kept.[sonny.workflows]:enabled(default true),concurrency,max_agents,max_runs(8).No protocol or schema bump. No daemon change. One new sonny dependency:
jsonschema.Where it differs from Claude Code
Same script language and results; two mechanisms underneath differ. Schemas use structured output instead of a
StructuredOutputtool. Resume is keyed by each call's content (prompt and options), not by the longest unchanged prefix, because concurrent calls reach the host in no fixed order. The tool description does not list saved workflows.Docs
sonny/skills/workflow/SKILL.md(shipped, installed when enabled), a Workflows section in docs/SONNY.md, a note in docs/DESIGN.md, a FEATURES.md row, and an AGENTS.md clause: a script an agent writes for one job, run by Sonny over ordinary bots, is not a workflow builder.Tests
tests/test_served.py): a lead runs a two-agent workflow, one with a schema, hears back once with both values, then resumes from it with no agent made.cargo fmt --check, clippy-D warnings,cargo test -p sonny, andtests.test_servedagainst a release build all pass.The /status row per run and a Stop key come in a follow-up PR.
🤖 Generated with Claude Code