Repository navigation
Description
Summary
A read-only multi-operator Graph review exposed three failure modes in one run:
- concurrent tool calls could fail with
Tool ledger transition rejected: orphan_response; update_agent_graphaccepted non-catalogagent_idvalues, but those work items remainedrequestedforever with no operator provisioned;- after using the valid catalog agent and obtaining completed operator records, durable supervisor wakes repeatedly exceeded the context window and the CLI exited without a final synthesis.
The third failure is the most damaging: useful work had completed and was persisted, but the root supervisor could not recover/finalize the graph.
Environment
- Maka repository commit:
14cb517fb5b3 - package.json version:
0.1.1 maka --version:0.1.0- Node.js:
v22.19.0 - macOS 15.5 (24F74)
- command mode:
maka run --graph - model used for the successful operator run:
gpt-5.6-sol - permission mode:
bypass
Reproduction outline
Run a Graph task against a non-trivial repository and ask the root to schedule four read-only review operators:
maka run --graph \
--cwd /path/to/repo \
--connection <connection> \
--model gpt-5.6-sol \
--thinking high \
--timeout 1800 \
--max-steps 200 \
--permission-mode bypass \
"First call update_agent_graph and schedule four implementation agents. Each agent should inspect a separate aspect of a large PR, produce evidence with file/line references, and make no edits. Wait for committed records, inspect all results, cross-check conflicts, then close the graph with a concise synthesis."The review produced four initial operators. Three committed complete records; one provider run exceeded context before its final record. The root correctly scheduled a narrower replacement operator, which also finished its investigation and eventually wrote a final assistant result.
The root supervisor then attempted durable wakes but never produced the final graph response. The CLI terminated with:
maka run: Agent graph supervisor wake was not delivered after 3 attempts: errored: Context window exceeded
Observed provider request sizes for two operator/root paths were roughly 335–373 KB. The original checkout remained clean; this was not caused by filesystem mutation or an approval prompt.
Related failure modes observed
A. Concurrent tool responses can orphan the ledger
With another connection/model, an operator emitted three Bash calls together. In explore mode they were denied, after which the session failed immediately with:
Tool ledger transition rejected: orphan_response
Expected: every response should be paired with its call, or the runtime should serialize/normalize concurrent denials without invalidating the session ledger.
B. Unknown agent IDs are accepted but never provisioned
The first scheduling attempt used role names such as write-semantics as agent_id. The current catalog only exposed implementation.
update_agent_graph accepted the schedule, but all work stayed requested, with no child sessions and no actionable validation error.
Expected: reject the update synchronously and report the allowed catalog IDs, or map role labels separately from the provisionable agent_id.
Expected behavior
- A failed operator should not prevent the root from consuming already committed records.
- Durable supervisor wakes should reconstruct a compact state from graph projections and committed result records, not repeatedly carry raw operator transcripts/tool output.
- A context overflow during synthesis should trigger a compact recovery path (fresh supervisor context, summarized records, or bounded
agent_outputreads). - If final synthesis still cannot run, the CLI should return a structured partial result containing completed records and the failed work item, rather than losing the entire user-facing result.
- Invalid catalog agent IDs should fail at schedule-update time.
- Concurrent denied tool calls should not produce an orphan ledger transition.
Actual behavior
- Three complete committed review records and a completed replacement investigation existed on disk.
- The graph remained open.
- Supervisor wake delivery failed three times with the same context overflow.
maka runexited non-zero without a final synthesis, requiring manual inspection of session JSONL and Graph projection data.
Suggested fixes / diagnostics
- Put a strict token/byte budget on supervisor wake context.
- Hydrate only topology, work status, and bounded committed-result summaries by default.
- Start a fresh compact supervisor session after the first context overflow rather than retrying the same oversized context.
- Expose a deterministic partial-finalization path when some records are complete.
- Validate
agent_idagainst the graph catalog insideupdate_agent_graph. - Add a concurrency test where several tool calls are denied/resolved together and assert ledger pairing.
- Add an integration test with one failed operator, three large committed records, a replacement work item, and a root synthesis close.
Local diagnostic identifiers, if useful for correlating logs:
- graph:
agent_graph_dce8193c986be9e499849caa7c2349d1 - root session:
df8ef196-7994-4611-b378-b7a6cfafc34a
No credentials or repository contents are included in this report.
Activity
likun666661 commentedon Jul 29, 2026
Post-fix live regression on the top of the four-PR stack (
03fdf594) succeeded against the original large PR-review shape.3224f3b4-15a1-4add-9849-021406111bdaagent_graph_d9425bd24df84d0c7c316c4223d6afb4Operation failederrors; the durable supervisor added bounded follow-up work to the same operators at schedule revision 2.agent_output view=result max_bytes=32768returned 3,778 / 4,559 / 3,965 / 4,937 bytes for the four successful results. The two failed-run diagnostic envelopes were 2,223 / 2,273 bytes. The largest supervisor provider request was 462,287 bytes, versus the original reproduction's 1.13–2.248 MB growth and 479–572 KB individualagent_outputpayloads.No context overflow, compaction, forced recovery, or partial fallback occurred. The supervisor produced and persisted the final review, and
maka run --graphexited successfully after the graph closed.A separate failure-path issue found during this run is tracked in #1604:
maka run --graphcan hang when the root provider request fails before any graph schedule exists, and the provider error is reduced to[object Object].