diff --git a/packages/notify/README.md b/packages/notify/README.md index d98c596..73dd1bc 100644 --- a/packages/notify/README.md +++ b/packages/notify/README.md @@ -28,6 +28,7 @@ A *turn* starts when your own words reach the model, and ends when the model ans - A new message from you while a turn runs starts it over. - Subagents are left out. Subagents share their parent's session, so a conversation is the session plus its first user message (for Codex, its thread id, or else its first user message that isn't one of Codex's own ``-style blocks). Codex marks the subagents it starts (`client_metadata`: `x-openai-subagent`, `parent_thread_id`), so those are always nested, except `/review`, which you start and wait for. For Claude Code, a conversation that first shows up while another conversation in the same session is mid-request or running a tool is a subagent, and its end sends nothing and doesn't touch the main turn. A conversation unseen for 15 minutes no longer counts, and agents magpie gives no session id are never treated as nested. - Compaction doesn't end a turn. Claude Code's summary request (its instructions follow a "CRITICAL: Respond with TEXT ONLY" preamble, often in the same message as the last tool result) and Codex's compaction neither open nor close one. The conversation that goes on from the summary is matched to the conversation that asked for it, and keeps its turn and start time; a subagent that compacts stays a subagent. Codex's local compaction offers no tools, so it's otherwise left out like any side call; the summary it then sends as a user message, and its ``, aren't your words and don't start a turn. +- A subagent's progress label doesn't end anything. Claude Code 2.1.318 and newer asks the model about every 30 seconds for a 3-5 word label of what each running subagent is doing: the subagent's own conversation, tools and all, with "Describe your most recent action in 3-5 words…" as the newest user text, answered with plain text. That request is left out like a side call, so it neither ends the subagent's turn nor makes the subagent's next request look like a conversation of its own once the parent has been quiet a while (which pushed "done" from the middle of a long agent's work). `CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES=1` turns the requests off in Claude Code itself. - Claude Code's background agents belong to the turn that launched them. When the Agent tool answers "Async agent launched successfully", the main conversation may stop and say it's waiting: that sends nothing. When the agent finishes, Claude Code resumes the main conversation with a notification (`[SYSTEM NOTIFICATION - NOT USER INPUT]`); that isn't your words (even with other `` blocks beside it), so it doesn't start a new turn, and the push comes when the main conversation ends with no agent still out, timed from your message. Agents are tracked by their tool-use id and agent id, so a retried request or an agent that notifies twice is counted once. A notification that names a tool-use id ends that call only; one that names only the agent ends every call it is out under. A notification whose `` says the agent will notify again — it stopped with background work of its own still running ("the result below may be interim"), or messages sent to it came too late and it is being resumed with them — doesn't count as its end: the turn waits for the next one, which may carry only the agent's id. Only the `` is read for this, never the agent's own ``, which may quote the same words. `SendMessage` to an agent that has finished resumes it in the background (its result has `resumedAgentId`), and holds the turn the same way until the agent notifies again, under the `SendMessage` call's id: the agent's earlier calls are done, so a late notification of an earlier run doesn't end the resumed one; a message queued for an agent still at work launches nothing new. An agent that keeps background work of its own running for good (a dev server) holds the turn that launched it until it stops, or until your next message: you've seen its interim report, so once you write again it holds nothing and later turns push as usual (its final notification, if it ever comes, is then harmless). Requests from an agent that starts after its parent stopped are still a subagent's (for up to 2 hours). The same holds for a notification that arrives with a tool result while the main conversation is still working, and for the Workflow tool, which always runs in the background. Background Bash commands (`run_in_background`) notify the same way but don't hold the turn, since a dev server never stops: a main conversation that stops while one runs ends its turn. - A failure push waits `failureHoldSeconds` (60 by default) and is dropped if the conversation goes on, since agents retry 429s and 5xx on their own and Esc reaches magpie as a failure too. - One push per conversation per `cooldownSeconds`. @@ -96,4 +97,4 @@ One of magpie's asynchronous gateway hooks (`magpie.hooks`, Magpie 0.1.1273 or n bun test packages/notify ``` -The tests run the hooks as the gateway calls them, with every channel faked: no network and no account. Compaction and background agents are tested on request bodies recorded from the real `claude` 2.1.316 (`fixtures/claude-2.1.316`, long system reminders and tool schemas cut short, block order and shape as sent): `claude -p` (and the interactive TUI, which sends the same) with a sandbox `HOME` / `CLAUDE_CONFIG_DIR` and `ANTHROPIC_BASE_URL` at a local recording endpoint that scripts the replies, no API key needed. Codex compaction and subagents are tested the same way on bodies from the real `codex` 0.166.0 (`fixtures/codex-0.166.0`, developer instructions and tool schemas cut): `codex exec` with a custom provider (local compaction) and with `openai_base_url` (remote compaction), and the TUI for a subagent that outlives its parent's turn. The `agent-busy`, `agent-two`, `workflow`, `bash-background`, `agent-foreground`, `agent-interim`, `sendmessage` and `late-message` fixtures are whole runs, every request in the order sent (the last three from the TUI, so Claude Code stays up for the agent's second notification). +The tests run the hooks as the gateway calls them, with every channel faked: no network and no account. Compaction and background agents are tested on request bodies recorded from the real `claude` 2.1.316 (`fixtures/claude-2.1.316`, long system reminders and tool schemas cut short, block order and shape as sent): `claude -p` (and the interactive TUI, which sends the same) with a sandbox `HOME` / `CLAUDE_CONFIG_DIR` and `ANTHROPIC_BASE_URL` at a local recording endpoint that scripts the replies, no API key needed. Codex compaction and subagents are tested the same way on bodies from the real `codex` 0.166.0 (`fixtures/codex-0.166.0`, developer instructions and tool schemas cut): `codex exec` with a custom provider (local compaction) and with `openai_base_url` (remote compaction), and the TUI for a subagent that outlives its parent's turn. The `agent-busy`, `agent-two`, `workflow`, `bash-background`, `agent-foreground`, `agent-interim`, `sendmessage` and `late-message` fixtures are whole runs, every request in the order sent (the last three from the TUI, so Claude Code stays up for the agent's second notification). The same rigs re-recorded them against `claude` 2.1.325 (`fixtures/claude-2.1.325`: a background agent with its progress-summary requests, from the TUI, which turns them on; an interim agent; `SendMessage` to a finished and to a running agent; `/compact` twice in a row and `/compact` again after a message, from the TUI; auto-compaction with `CLAUDE_CODE_AUTO_COMPACT_WINDOW`) and `codex` 0.169.0 (`fixtures/codex-0.169.0`, with the request headers that mark subagents: a plain turn, a subagent waited for and one that outlives its parent's turn and rides in with your next message, local and remote compaction, a message queued with Tab and one steered into a running turn). diff --git a/packages/notify/fixtures/claude-2.1.325/agent-interim-01.json b/packages/notify/fixtures/claude-2.1.325/agent-interim-01.json new file mode 100644 index 0000000..35f84dc --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-interim-01.json @@ -0,0 +1,152 @@ +{ + "session": "d40c2d1f-97b2-4868-a832-e92afa93a7b3", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_INTERIM", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_int", + "name": "Agent", + "input": { + "description": "interim job", + "prompt": "SUBTASK_INTERIM: start a background command, then stop", + "subagent_type": "claude", + "run_in_background": true + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-interim-02.json b/packages/notify/fixtures/claude-2.1.325/agent-interim-02.json new file mode 100644 index 0000000..144c144 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-interim-02.json @@ -0,0 +1,113 @@ +{ + "session": "d40c2d1f-97b2-4868-a832-e92afa93a7b3", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_INTERIM: start a background command, then stop", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_bgbash", + "name": "Bash", + "input": { + "command": "sleep 15; echo bgdone", + "description": "background sleep", + "run_in_background": true + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-interim-03.json b/packages/notify/fixtures/claude-2.1.325/agent-interim-03.json new file mode 100644 index 0000000..2894b50 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-interim-03.json @@ -0,0 +1,180 @@ +{ + "session": "d40c2d1f-97b2-4868-a832-e92afa93a7b3", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_INTERIM" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_int", + "name": "Agent", + "input": { + "description": "interim job", + "prompt": "SUBTASK_INTERIM: start a background command, then stop", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_int", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: ab40d1efdf2cfe4e7 (internal ID - do not mention to user. Use SendMessage with to: 'ab40d1efdf2cfe4e7', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/d40c2d1f-97b2-4868-a832-e92afa93a7b3/tasks/ab40d1efdf2cfe4e7.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ], + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-interim-04.json b/packages/notify/fixtures/claude-2.1.325/agent-interim-04.json new file mode 100644 index 0000000..1c0ed71 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-interim-04.json @@ -0,0 +1,133 @@ +{ + "session": "d40c2d1f-97b2-4868-a832-e92afa93a7b3", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_INTERIM: start a background command, then stop" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_bgbash", + "name": "Bash", + "input": { + "command": "sleep 15; echo bgdone", + "description": "background sleep", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_bgbash", + "type": "tool_result", + "content": "Command running in background with ID: baw8tmwqq. Output is being written to: /tmp/claude-1000/-tmp-sbx-proj/d40c2d1f-97b2-4868-a832-e92afa93a7b3/tasks/baw8tmwqq.output. You will be notified when it completes — do not poll that file or sleep while waiting. Read the file only if the user asks for progress, or if you need a line it prints before you can go on, such as a server's ready line or port.\n\n\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n\n\n\n14999985 tokens left\n", + "is_error": false, + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Started the background command; stopping for now." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-interim-05.json b/packages/notify/fixtures/claude-2.1.325/agent-interim-05.json new file mode 100644 index 0000000..fbea9c6 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-interim-05.json @@ -0,0 +1,202 @@ +{ + "session": "d40c2d1f-97b2-4868-a832-e92afa93a7b3", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_INTERIM" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_int", + "name": "Agent", + "input": { + "description": "interim job", + "prompt": "SUBTASK_INTERIM: start a background command, then stop", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_int", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: ab40d1efdf2cfe4e7 (internal ID - do not mention to user. Use SendMessage with to: 'ab40d1efdf2cfe4e7', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/d40c2d1f-97b2-4868-a832-e92afa93a7b3/tasks/ab40d1efdf2cfe4e7.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nBash\n\n" + }, + { + "type": "text", + "text": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\nab40d1efdf2cfe4e7\ntoolu_ag_int\n/tmp/claude-1000/-tmp-sbx-proj/d40c2d1f-97b2-4868-a832-e92afa93a7b3/tasks/ab40d1efdf2cfe4e7.output\ncompleted\nAgent \"interim job\" is waiting on its own background work\nThis agent stopped with background work of its own still running. It may resume on its own when that work completes or reports, and the same task-id notifies again if it does; the result below may be interim.\nStarted the background command; stopping for now.\n241304\n\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Interim result noted, still waiting." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-interim-06.json b/packages/notify/fixtures/claude-2.1.325/agent-interim-06.json new file mode 100644 index 0000000..0c318bc --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-interim-06.json @@ -0,0 +1,151 @@ +{ + "session": "d40c2d1f-97b2-4868-a832-e92afa93a7b3", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_INTERIM: start a background command, then stop" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_bgbash", + "name": "Bash", + "input": { + "command": "sleep 15; echo bgdone", + "description": "background sleep", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_bgbash", + "type": "tool_result", + "content": "Command running in background with ID: baw8tmwqq. Output is being written to: /tmp/claude-1000/-tmp-sbx-proj/d40c2d1f-97b2-4868-a832-e92afa93a7b3/tasks/baw8tmwqq.output. You will be notified when it completes — do not poll that file or sleep while waiting. Read the file only if the user asks for progress, or if you need a line it prints before you can go on, such as a server's ready line or port.\n\n\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n\n\n\n14999985 tokens left\n", + "is_error": false + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Started the background command; stopping for now." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\nbaw8tmwqq\ntoolu_bgbash\n/tmp/claude-1000/-tmp-sbx-proj/d40c2d1f-97b2-4868-a832-e92afa93a7b3/tasks/baw8tmwqq.output\ncompleted\nBackground command \"background sleep\" completed (exit code 0)\n\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Background command finished: bgdone." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-interim-07.json b/packages/notify/fixtures/claude-2.1.325/agent-interim-07.json new file mode 100644 index 0000000..4969637 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-interim-07.json @@ -0,0 +1,220 @@ +{ + "session": "d40c2d1f-97b2-4868-a832-e92afa93a7b3", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_INTERIM" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_int", + "name": "Agent", + "input": { + "description": "interim job", + "prompt": "SUBTASK_INTERIM: start a background command, then stop", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_int", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: ab40d1efdf2cfe4e7 (internal ID - do not mention to user. Use SendMessage with to: 'ab40d1efdf2cfe4e7', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/d40c2d1f-97b2-4868-a832-e92afa93a7b3/tasks/ab40d1efdf2cfe4e7.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nBash\n\n" + }, + { + "type": "text", + "text": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\nab40d1efdf2cfe4e7\ntoolu_ag_int\n/tmp/claude-1000/-tmp-sbx-proj/d40c2d1f-97b2-4868-a832-e92afa93a7b3/tasks/ab40d1efdf2cfe4e7.output\ncompleted\nAgent \"interim job\" is waiting on its own background work\nThis agent stopped with background work of its own still running. It may resume on its own when that work completes or reports, and the same task-id notifies again if it does; the result below may be interim.\nStarted the background command; stopping for now.\n241304\n\n" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Interim result noted, still waiting." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\nab40d1efdf2cfe4e7\n/tmp/claude-1000/-tmp-sbx-proj/d40c2d1f-97b2-4868-a832-e92afa93a7b3/tasks/ab40d1efdf2cfe4e7.output\ncompleted\nAgent \"interim job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.\nBackground command finished: bgdone.\n20115305\n\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "All done." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-progress-01.json b/packages/notify/fixtures/claude-2.1.325/agent-progress-01.json new file mode 100644 index 0000000..f5027da --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-progress-01.json @@ -0,0 +1,152 @@ +{ + "session": "f14a2eaf-5004-41b6-b845-075b2876c2f9", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_BG", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_bg", + "name": "Agent", + "input": { + "description": "slow job", + "prompt": "SUBTASK_BG: run two slow commands", + "subagent_type": "general-purpose", + "run_in_background": true + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-progress-02.json b/packages/notify/fixtures/claude-2.1.325/agent-progress-02.json new file mode 100644 index 0000000..09e05db --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-progress-02.json @@ -0,0 +1,112 @@ +{ + "session": "f14a2eaf-5004-41b6-b845-075b2876c2f9", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_BG: run two slow commands", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_slow0", + "name": "Bash", + "input": { + "command": "python3 -c \"import time; time.sleep(45)\"; echo slow0", + "description": "slow step 0" + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-progress-03.json b/packages/notify/fixtures/claude-2.1.325/agent-progress-03.json new file mode 100644 index 0000000..22b3f53 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-progress-03.json @@ -0,0 +1,180 @@ +{ + "session": "f14a2eaf-5004-41b6-b845-075b2876c2f9", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_BG" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_bg", + "name": "Agent", + "input": { + "description": "slow job", + "prompt": "SUBTASK_BG: run two slow commands", + "subagent_type": "general-purpose", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_bg", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: afe8dcb12667dad7e (internal ID - do not mention to user. Use SendMessage with to: 'afe8dcb12667dad7e', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/f14a2eaf-5004-41b6-b845-075b2876c2f9/tasks/afe8dcb12667dad7e.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ], + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-progress-04.json b/packages/notify/fixtures/claude-2.1.325/agent-progress-04.json new file mode 100644 index 0000000..3d3f2af --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-progress-04.json @@ -0,0 +1,108 @@ +{ + "session": "f14a2eaf-5004-41b6-b845-075b2876c2f9", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_BG: run two slow commands\n" + }, + { + "type": "text", + "text": "Describe your most recent action in 3-5 words using present tense (-ing). Name the file or function, not the branch. Do not use tools.\n\nGood: \"Reading runAgent.ts\"\nGood: \"Fixing null check in validate.ts\"\nGood: \"Running auth module tests\"\nGood: \"Adding retry logic to fetchUser\"\n\nBad (past tense): \"Analyzed the branch diff\"\nBad (too vague): \"Investigating the issue\"\nBad (too long): \"Reviewing full branch diff and AgentTool.tsx integration\"\nBad (branch name): \"Analyzed adam/background-summary branch diff\"" + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Running sleep command" + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-progress-05.json b/packages/notify/fixtures/claude-2.1.325/agent-progress-05.json new file mode 100644 index 0000000..83e0f26 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-progress-05.json @@ -0,0 +1,137 @@ +{ + "session": "f14a2eaf-5004-41b6-b845-075b2876c2f9", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_BG: run two slow commands" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_slow0", + "name": "Bash", + "input": { + "command": "python3 -c \"import time; time.sleep(45)\"; echo slow0", + "description": "slow step 0" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_slow0", + "type": "tool_result", + "content": "slow0\n\n\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n\n\n\n14999985 tokens left\n", + "is_error": false, + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_slow1", + "name": "Bash", + "input": { + "command": "python3 -c \"import time; time.sleep(45)\"; echo slow1", + "description": "slow step 1" + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-progress-06.json b/packages/notify/fixtures/claude-2.1.325/agent-progress-06.json new file mode 100644 index 0000000..e5c3f20 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-progress-06.json @@ -0,0 +1,136 @@ +{ + "session": "f14a2eaf-5004-41b6-b845-075b2876c2f9", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_BG: run two slow commands" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_slow0", + "name": "Bash", + "input": { + "command": "python3 -c \"import time; time.sleep(45)\"; echo slow0", + "description": "slow step 0" + }, + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_slow0", + "type": "tool_result", + "content": "slow0\n\n\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n\n\n\n14999985 tokens left\n", + "is_error": false + }, + { + "type": "text", + "text": "Describe your most recent action in 3-5 words using present tense (-ing). Name the file or function, not the branch. Do not use tools.\n\nPrevious: \"Running sleep command\" — say something NEW.\n\nGood: \"Reading runAgent.ts\"\nGood: \"Fixing null check in validate.ts\"\nGood: \"Running auth module tests\"\nGood: \"Adding retry logic to fetchUser\"\n\nBad (past tense): \"Analyzed the branch diff\"\nBad (too vague): \"Investigating the issue\"\nBad (too long): \"Reviewing full branch diff and AgentTool.tsx integration\"\nBad (branch name): \"Analyzed adam/background-summary branch diff\"" + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Running sleep command" + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-progress-07.json b/packages/notify/fixtures/claude-2.1.325/agent-progress-07.json new file mode 100644 index 0000000..f672551 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-progress-07.json @@ -0,0 +1,157 @@ +{ + "session": "f14a2eaf-5004-41b6-b845-075b2876c2f9", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_BG: run two slow commands" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_slow0", + "name": "Bash", + "input": { + "command": "python3 -c \"import time; time.sleep(45)\"; echo slow0", + "description": "slow step 0" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_slow0", + "type": "tool_result", + "content": "slow0\n\n\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n\n\n\n14999985 tokens left\n", + "is_error": false + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_slow1", + "name": "Bash", + "input": { + "command": "python3 -c \"import time; time.sleep(45)\"; echo slow1", + "description": "slow step 1" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_slow1", + "type": "tool_result", + "content": "slow1\n\n\n14999985 tokens left\n", + "is_error": false, + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Slept twice, done." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/agent-progress-08.json b/packages/notify/fixtures/claude-2.1.325/agent-progress-08.json new file mode 100644 index 0000000..d112486 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/agent-progress-08.json @@ -0,0 +1,202 @@ +{ + "session": "f14a2eaf-5004-41b6-b845-075b2876c2f9", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_BG" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_bg", + "name": "Agent", + "input": { + "description": "slow job", + "prompt": "SUBTASK_BG: run two slow commands", + "subagent_type": "general-purpose", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_bg", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: afe8dcb12667dad7e (internal ID - do not mention to user. Use SendMessage with to: 'afe8dcb12667dad7e', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/f14a2eaf-5004-41b6-b845-075b2876c2f9/tasks/afe8dcb12667dad7e.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nBash\n\n" + }, + { + "type": "text", + "text": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\nafe8dcb12667dad7e\ntoolu_ag_bg\n/tmp/claude-1000/-tmp-sbx-proj/f14a2eaf-5004-41b6-b845-075b2876c2f9/tasks/afe8dcb12667dad7e.output\ncompleted\nAgent \"slow job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.\nSlept twice, done.\n17290594\n\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "All done." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/autocompact-01.json b/packages/notify/fixtures/claude-2.1.325/autocompact-01.json new file mode 100644 index 0000000..aec0eca --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/autocompact-01.json @@ -0,0 +1,144 @@ +{ + "session": "3784d11e-ffb4-4111-a2cd-c9f9e397dc3f", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_AUTO run two steps", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_auto0", + "name": "Bash", + "input": { + "command": "echo step0", + "description": "step 0" + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/autocompact-02.json b/packages/notify/fixtures/claude-2.1.325/autocompact-02.json new file mode 100644 index 0000000..f0d204e --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/autocompact-02.json @@ -0,0 +1,168 @@ +{ + "session": "3784d11e-ffb4-4111-a2cd-c9f9e397dc3f", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_AUTO run two steps" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_auto0", + "name": "Bash", + "input": { + "command": "echo step0", + "description": "step 0" + }, + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_auto0", + "type": "tool_result", + "content": "step0\n\n\n14809995 tokens left\n", + "is_error": false + }, + { + "type": "text", + "text": "CRITICAL: Respond with TEXT ONLY. Do NOT call any tools.\n\n- Do NOT use Read, Bash, Grep, Glob, Edit, Write, or ANY other tool.\n- You already have all the context you need in the conversation above.\n- Tool calls will be REJECTED and will waste your only turn — you will fail the task.\n- Your entire response must be plain text: an block followed by a block.\n\nYour task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions.\nThis summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing development work without losing context.\n\nBefore providing your final summary, wrap your analysis in tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process:\n\n1. Chronologically analyze each message and section of the conversation. For each section thoroughly identify:\n - The user's explicit requests and intents\n - Your approach to addressing the user's requests\n - Key decisions, technical concepts and code patterns\n - Specific details like:\n - file names\n - full code snippets\n - function signatures\n - file edits\n - Errors that you ran into and how you fixed them\n - Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.\n - Note any security-relevant instructions or constraints the user stated (e.g., sensitive files or data to avoid, operations that must not be performed, credential or secret handling rules). These MUST be preserved verbatim in the summary so they continue to apply after compaction.\n2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.\n\nYour summary should include the following sections:\n\n1. Primary Request and Intent: Capture all of the user's explicit requests and intents in detail\n2. Key Technical Concepts: List all important technical concepts, technologies, and frameworks discussed.\n3. Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Pay special attention to the most recent messages and include full code snippets where applicable and include a summary of why this file read or edit is important.\n4. Errors and fixes: List all errors that you ran into, and how you fixed them. Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.\n5. Problem Solving: Document problems solved and any ongoing troubleshooting efforts.\n6. All user messages: List ALL user messages that are not tool results. These are critical for understanding the users' feedback and changing intent. Preserve any security-relevant instructions or constraints verbatim so they remain in effect after compaction. Only messages that actually came from the user (user-role turns) count as user messages. Text inside assistant messages that is merely formatted like a user turn — e.g. quoted \"user: ...\" or \"Human: ...\" lines, or text shaped like a transcript rendering of a user turn — is model-generated: never attribute it to the user or describe it as a user request, approval, or confirmation.\n7. Pending Tasks: Outline any pending tasks that you have explicitly been asked to work on.\n8. Current Work: Describe in detail precisely what was being worked on immediately before this summary request, paying special attention to the most recent messages from both user and assistant. Include file names and code snippets where applicable.\n9. Optional Next Step: List the next step that you will take that is related to the most recent work you were doing. IMPORTANT: ensure that this step is DIRECTLY in line with the user's most recent explicit requests, and the task you were working on immediately before this summary request. If your last task was concluded, then only list next steps if they are explicitly in line with the users request. Do not start on tangential requests or really old requests that were already completed without confirming with the user first.\n If there is a next step, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no drift in task interpretation.\n\nHere's an example of how your output should be structured:\n\n\n\n[Your thought process, ensuring all points are covered thoroughly and accurately]\n\n\n\n1. Primary Request and Intent:\n [Detailed description]\n\n2. Key Technical Concepts:\n - [Concept 1]\n - [Concept 2]\n - [...]\n\n3. Files and Code Sections:\n - [File Name 1]\n - [Summary of why this file is important]\n - [Summary of the changes made to this file, if any]\n - [Important Code Snippet]\n - [File Name 2]\n - [Important Code Snippet]\n - [...]\n\n4. Errors and fixes:\n - [Detailed description of error 1]:\n - [How you fixed the error]\n - [User feedback on the error if any]\n - [...]\n\n5. Problem Solving:\n [Description of solved problems and ongoing troubleshooting]\n\n6. All user messages: \n - [Detailed non tool use user message]\n - [...]\n\n7. Pending Tasks:\n - [Task 1]\n - [Task 2]\n - [...]\n\n8. Current Work:\n [Precise description of current work]\n\n9. Optional Next Step:\n [Optional Next step to take]\n\n\n\n\nPlease provide your summary based on the conversation so far, following this structure and ensuring precision and thoroughness in your response. \n\nThere may be additional summarization instructions provided in the included context. If so, remember to follow these instructions when creating the above summary. Examples of instructions include:\n\n## Compact Instructions\nWhen summarizing the conversation focus on typescript code changes and also remember the mistakes you made and how you fixed them.\n\n\n\n# Summary instructions\nWhen you are using compact - please focus on test output and code changes. Include file reads verbatim.\n\n\n\nREMINDER: Do NOT call any tools. Respond with plain text only — an block followed by a block. Tool calls will be rejected and you will fail the task." + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "short\n1. Primary Request: AUTO_SUMMARY the user asked for steps; steps 1-2 ran." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/autocompact-03.json b/packages/notify/fixtures/claude-2.1.325/autocompact-03.json new file mode 100644 index 0000000..5b4ea77 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/autocompact-03.json @@ -0,0 +1,140 @@ +{ + "session": "3784d11e-ffb4-4111-a2cd-c9f9e397dc3f", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier portion of the conversation.\n\n\nBash\n\nSummary:\n1. Primary Request: AUTO_SUMMARY the user asked for steps; steps 1-2 ran.\n\nIf you need specific details from before compaction (like exact code snippets, error messages, or content you generated), read the full transcript at: /tmp/sbx/home/.claude/projects/-tmp-sbx-proj/3784d11e-ffb4-4111-a2cd-c9f9e397dc3f.jsonl\nContinue the conversation from where it left off without asking the user any further questions. Resume directly — do not acknowledge the summary, do not recap what was happening, do not preface with \"I'll continue\" or similar. Pick up the last task as if the break never happened.", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_auto0c", + "name": "Bash", + "input": { + "command": "echo step0", + "description": "step 0" + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/autocompact-04.json b/packages/notify/fixtures/claude-2.1.325/autocompact-04.json new file mode 100644 index 0000000..45dc16a --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/autocompact-04.json @@ -0,0 +1,165 @@ +{ + "session": "3784d11e-ffb4-4111-a2cd-c9f9e397dc3f", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier portion of the conversation.\n\n\nBash\n\nSummary:\n1. Primary Request: AUTO_SUMMARY the user asked for steps; steps 1-2 ran.\n\nIf you need specific details from before compaction (like exact code snippets, error messages, or content you generated), read the full transcript at: /tmp/sbx/home/.claude/projects/-tmp-sbx-proj/3784d11e-ffb4-4111-a2cd-c9f9e397dc3f.jsonl\nContinue the conversation from where it left off without asking the user any further questions. Resume directly — do not acknowledge the summary, do not recap what was happening, do not preface with \"I'll continue\" or similar. Pick up the last task as if the break never happened." + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_auto0c", + "name": "Bash", + "input": { + "command": "echo step0", + "description": "step 0" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_auto0c", + "type": "tool_result", + "content": "step0\n\n\n14809980 tokens left\n", + "is_error": false, + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_auto1c", + "name": "Bash", + "input": { + "command": "echo step1", + "description": "step 1" + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/autocompact-05.json b/packages/notify/fixtures/claude-2.1.325/autocompact-05.json new file mode 100644 index 0000000..1233d3f --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/autocompact-05.json @@ -0,0 +1,185 @@ +{ + "session": "3784d11e-ffb4-4111-a2cd-c9f9e397dc3f", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier portion of the conversation.\n\n\nBash\n\nSummary:\n1. Primary Request: AUTO_SUMMARY the user asked for steps; steps 1-2 ran.\n\nIf you need specific details from before compaction (like exact code snippets, error messages, or content you generated), read the full transcript at: /tmp/sbx/home/.claude/projects/-tmp-sbx-proj/3784d11e-ffb4-4111-a2cd-c9f9e397dc3f.jsonl\nContinue the conversation from where it left off without asking the user any further questions. Resume directly — do not acknowledge the summary, do not recap what was happening, do not preface with \"I'll continue\" or similar. Pick up the last task as if the break never happened." + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_auto0c", + "name": "Bash", + "input": { + "command": "echo step0", + "description": "step 0" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_auto0c", + "type": "tool_result", + "content": "step0\n\n\n14809980 tokens left\n", + "is_error": false + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_auto1c", + "name": "Bash", + "input": { + "command": "echo step1", + "description": "step 1" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_auto1c", + "type": "tool_result", + "content": "step1\n\n\n14809980 tokens left\n", + "is_error": false, + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Done." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/compact-again-01.json b/packages/notify/fixtures/claude-2.1.325/compact-again-01.json new file mode 100644 index 0000000..1e7337f --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/compact-again-01.json @@ -0,0 +1,145 @@ +{ + "session": "f09f9d63-6104-4222-a7b0-2f302d510bec", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_HI run", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Hi!" + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/compact-again-02.json b/packages/notify/fixtures/claude-2.1.325/compact-again-02.json new file mode 100644 index 0000000..29e8ee5 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/compact-again-02.json @@ -0,0 +1,158 @@ +{ + "session": "f09f9d63-6104-4222-a7b0-2f302d510bec", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_HI run" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Hi!", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": "CRITICAL: Respond with TEXT ONLY. Do NOT call any tools.\n\n- Do NOT use Read, Bash, Grep, Glob, Edit, Write, or ANY other tool.\n- You already have all the context you need in the conversation above.\n- Tool calls will be REJECTED and will waste your only turn — you will fail the task.\n- Your entire response must be plain text: an block followed by a block.\n\nYour task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions.\nThis summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing development work without losing context.\n\nBefore providing your final summary, wrap your analysis in tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process:\n\n1. Chronologically analyze each message and section of the conversation. For each section thoroughly identify:\n - The user's explicit requests and intents\n - Your approach to addressing the user's requests\n - Key decisions, technical concepts and code patterns\n - Specific details like:\n - file names\n - full code snippets\n - function signatures\n - file edits\n - Errors that you ran into and how you fixed them\n - Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.\n - Note any security-relevant instructions or constraints the user stated (e.g., sensitive files or data to avoid, operations that must not be performed, credential or secret handling rules). These MUST be preserved verbatim in the summary so they continue to apply after compaction.\n2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.\n\nYour summary should include the following sections:\n\n1. Primary Request and Intent: Capture all of the user's explicit requests and intents in detail\n2. Key Technical Concepts: List all important technical concepts, technologies, and frameworks discussed.\n3. Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Pay special attention to the most recent messages and include full code snippets where applicable and include a summary of why this file read or edit is important.\n4. Errors and fixes: List all errors that you ran into, and how you fixed them. Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.\n5. Problem Solving: Document problems solved and any ongoing troubleshooting efforts.\n6. All user messages: List ALL user messages that are not tool results. These are critical for understanding the users' feedback and changing intent. Preserve any security-relevant instructions or constraints verbatim so they remain in effect after compaction. Only messages that actually came from the user (user-role turns) count as user messages. Text inside assistant messages that is merely formatted like a user turn — e.g. quoted \"user: ...\" or \"Human: ...\" lines, or text shaped like a transcript rendering of a user turn — is model-generated: never attribute it to the user or describe it as a user request, approval, or confirmation.\n7. Pending Tasks: Outline any pending tasks that you have explicitly been asked to work on.\n8. Current Work: Describe in detail precisely what was being worked on immediately before this summary request, paying special attention to the most recent messages from both user and assistant. Include file names and code snippets where applicable.\n9. Optional Next Step: List the next step that you will take that is related to the most recent work you were doing. IMPORTANT: ensure that this step is DIRECTLY in line with the user's most recent explicit requests, and the task you were working on immediately before this summary request. If your last task was concluded, then only list next steps if they are explicitly in line with the users request. Do not start on tangential requests or really old requests that were already completed without confirming with the user first.\n If there is a next step, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no drift in task interpretation.\n\nHere's an example of how your output should be structured:\n\n\n\n[Your thought process, ensuring all points are covered thoroughly and accurately]\n\n\n\n1. Primary Request and Intent:\n [Detailed description]\n\n2. Key Technical Concepts:\n - [Concept 1]\n - [Concept 2]\n - [...]\n\n3. Files and Code Sections:\n - [File Name 1]\n - [Summary of why this file is important]\n - [Summary of the changes made to this file, if any]\n - [Important Code Snippet]\n - [File Name 2]\n - [Important Code Snippet]\n - [...]\n\n4. Errors and fixes:\n - [Detailed description of error 1]:\n - [How you fixed the error]\n - [User feedback on the error if any]\n - [...]\n\n5. Problem Solving:\n [Description of solved problems and ongoing troubleshooting]\n\n6. All user messages: \n - [Detailed non tool use user message]\n - [...]\n\n7. Pending Tasks:\n - [Task 1]\n - [Task 2]\n - [...]\n\n8. Current Work:\n [Precise description of current work]\n\n9. Optional Next Step:\n [Optional Next step to take]\n\n\n\n\nPlease provide your summary based on the conversation so far, following this structure and ensuring precision and thoroughness in your response. \n\nThere may be additional summarization instructions provided in the included context. If so, remember to follow these instructions when creating the above summary. Examples of instructions include:\n\n## Compact Instructions\nWhen summarizing the conversation focus on typescript code changes and also remember the mistakes you made and how you fixed them.\n\n\n\n# Summary instructions\nWhen you are using compact - please focus on test output and code changes. Include file reads verbatim.\n\n\n\nREMINDER: Do NOT call any tools. Respond with plain text only — an block followed by a block. Tool calls will be rejected and you will fail the task." + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "short\n1. Primary Request: the user asked for steps; steps 1-2 ran." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/compact-again-03.json b/packages/notify/fixtures/claude-2.1.325/compact-again-03.json new file mode 100644 index 0000000..fb02c7c --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/compact-again-03.json @@ -0,0 +1,161 @@ +{ + "session": "f09f9d63-6104-4222-a7b0-2f302d510bec", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier portion of the conversation.\n\n\n\n\nSummary:\n1. Primary Request: the user asked for steps; steps 1-2 ran.\n\nIf you need specific details from before compaction (like exact code snippets, error messages, or content you generated), read the full transcript at: /tmp/sbx/home/.claude/projects/-tmp-sbx-proj/f09f9d63-6104-4222-a7b0-2f302d510bec.jsonl\nContinue the conversation from where it left off without asking the user any further questions. Resume directly — do not acknowledge the summary, do not recap what was happening, do not preface with \"I'll continue\" or similar. Pick up the last task as if the break never happened.\n" + }, + { + "type": "text", + "text": "The command below was run directly in Claude Code, not sent to you as a request, and its output goes straight to the user. It's recorded here as context for later messages.\n" + }, + { + "type": "text", + "text": "/compact\n compact\n \n" + }, + { + "type": "text", + "text": "\u001b[2mCompacted (ctrl+o to see full summary)\u001b[22m\n" + }, + { + "type": "text", + "text": "hello again", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "ok" + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/compact-again-04.json b/packages/notify/fixtures/claude-2.1.325/compact-again-04.json new file mode 100644 index 0000000..0387e17 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/compact-again-04.json @@ -0,0 +1,174 @@ +{ + "session": "f09f9d63-6104-4222-a7b0-2f302d510bec", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier portion of the conversation.\n\n\n\n\nSummary:\n1. Primary Request: the user asked for steps; steps 1-2 ran.\n\nIf you need specific details from before compaction (like exact code snippets, error messages, or content you generated), read the full transcript at: /tmp/sbx/home/.claude/projects/-tmp-sbx-proj/f09f9d63-6104-4222-a7b0-2f302d510bec.jsonl\nContinue the conversation from where it left off without asking the user any further questions. Resume directly — do not acknowledge the summary, do not recap what was happening, do not preface with \"I'll continue\" or similar. Pick up the last task as if the break never happened.\n" + }, + { + "type": "text", + "text": "The command below was run directly in Claude Code, not sent to you as a request, and its output goes straight to the user. It's recorded here as context for later messages.\n" + }, + { + "type": "text", + "text": "/compact\n compact\n \n" + }, + { + "type": "text", + "text": "\u001b[2mCompacted (ctrl+o to see full summary)\u001b[22m\n" + }, + { + "type": "text", + "text": "hello again" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "ok", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": "CRITICAL: Respond with TEXT ONLY. Do NOT call any tools.\n\n- Do NOT use Read, Bash, Grep, Glob, Edit, Write, or ANY other tool.\n- You already have all the context you need in the conversation above.\n- Tool calls will be REJECTED and will waste your only turn — you will fail the task.\n- Your entire response must be plain text: an block followed by a block.\n\nYour task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions.\nThis summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing development work without losing context.\n\nBefore providing your final summary, wrap your analysis in tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process:\n\n1. Chronologically analyze each message and section of the conversation. For each section thoroughly identify:\n - The user's explicit requests and intents\n - Your approach to addressing the user's requests\n - Key decisions, technical concepts and code patterns\n - Specific details like:\n - file names\n - full code snippets\n - function signatures\n - file edits\n - Errors that you ran into and how you fixed them\n - Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.\n - Note any security-relevant instructions or constraints the user stated (e.g., sensitive files or data to avoid, operations that must not be performed, credential or secret handling rules). These MUST be preserved verbatim in the summary so they continue to apply after compaction.\n2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.\n\nYour summary should include the following sections:\n\n1. Primary Request and Intent: Capture all of the user's explicit requests and intents in detail\n2. Key Technical Concepts: List all important technical concepts, technologies, and frameworks discussed.\n3. Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Pay special attention to the most recent messages and include full code snippets where applicable and include a summary of why this file read or edit is important.\n4. Errors and fixes: List all errors that you ran into, and how you fixed them. Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.\n5. Problem Solving: Document problems solved and any ongoing troubleshooting efforts.\n6. All user messages: List ALL user messages that are not tool results. These are critical for understanding the users' feedback and changing intent. Preserve any security-relevant instructions or constraints verbatim so they remain in effect after compaction. Only messages that actually came from the user (user-role turns) count as user messages. Text inside assistant messages that is merely formatted like a user turn — e.g. quoted \"user: ...\" or \"Human: ...\" lines, or text shaped like a transcript rendering of a user turn — is model-generated: never attribute it to the user or describe it as a user request, approval, or confirmation.\n7. Pending Tasks: Outline any pending tasks that you have explicitly been asked to work on.\n8. Current Work: Describe in detail precisely what was being worked on immediately before this summary request, paying special attention to the most recent messages from both user and assistant. Include file names and code snippets where applicable.\n9. Optional Next Step: List the next step that you will take that is related to the most recent work you were doing. IMPORTANT: ensure that this step is DIRECTLY in line with the user's most recent explicit requests, and the task you were working on immediately before this summary request. If your last task was concluded, then only list next steps if they are explicitly in line with the users request. Do not start on tangential requests or really old requests that were already completed without confirming with the user first.\n If there is a next step, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no drift in task interpretation.\n\nHere's an example of how your output should be structured:\n\n\n\n[Your thought process, ensuring all points are covered thoroughly and accurately]\n\n\n\n1. Primary Request and Intent:\n [Detailed description]\n\n2. Key Technical Concepts:\n - [Concept 1]\n - [Concept 2]\n - [...]\n\n3. Files and Code Sections:\n - [File Name 1]\n - [Summary of why this file is important]\n - [Summary of the changes made to this file, if any]\n - [Important Code Snippet]\n - [File Name 2]\n - [Important Code Snippet]\n - [...]\n\n4. Errors and fixes:\n - [Detailed description of error 1]:\n - [How you fixed the error]\n - [User feedback on the error if any]\n - [...]\n\n5. Problem Solving:\n [Description of solved problems and ongoing troubleshooting]\n\n6. All user messages: \n - [Detailed non tool use user message]\n - [...]\n\n7. Pending Tasks:\n - [Task 1]\n - [Task 2]\n - [...]\n\n8. Current Work:\n [Precise description of current work]\n\n9. Optional Next Step:\n [Optional Next step to take]\n\n\n\n\nPlease provide your summary based on the conversation so far, following this structure and ensuring precision and thoroughness in your response. \n\nThere may be additional summarization instructions provided in the included context. If so, remember to follow these instructions when creating the above summary. Examples of instructions include:\n\n## Compact Instructions\nWhen summarizing the conversation focus on typescript code changes and also remember the mistakes you made and how you fixed them.\n\n\n\n# Summary instructions\nWhen you are using compact - please focus on test output and code changes. Include file reads verbatim.\n\n\n\nREMINDER: Do NOT call any tools. Respond with plain text only — an block followed by a block. Tool calls will be rejected and you will fail the task." + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "short\n1. Primary Request: the user asked for steps; steps 1-2 ran." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/compact-again-05.json b/packages/notify/fixtures/claude-2.1.325/compact-again-05.json new file mode 100644 index 0000000..ea67fa8 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/compact-again-05.json @@ -0,0 +1,161 @@ +{ + "session": "f09f9d63-6104-4222-a7b0-2f302d510bec", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier portion of the conversation.\n\n\n\n\nSummary:\n1. Primary Request: the user asked for steps; steps 1-2 ran.\n\nIf you need specific details from before compaction (like exact code snippets, error messages, or content you generated), read the full transcript at: /tmp/sbx/home/.claude/projects/-tmp-sbx-proj/f09f9d63-6104-4222-a7b0-2f302d510bec.jsonl\nContinue the conversation from where it left off without asking the user any further questions. Resume directly — do not acknowledge the summary, do not recap what was happening, do not preface with \"I'll continue\" or similar. Pick up the last task as if the break never happened.\n" + }, + { + "type": "text", + "text": "The command below was run directly in Claude Code, not sent to you as a request, and its output goes straight to the user. It's recorded here as context for later messages.\n" + }, + { + "type": "text", + "text": "/compact\n compact\n \n" + }, + { + "type": "text", + "text": "\u001b[2mCompacted (ctrl+o to see full summary)\u001b[22m\n" + }, + { + "type": "text", + "text": "after the second compact", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "ok" + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/compact-twice-01.json b/packages/notify/fixtures/claude-2.1.325/compact-twice-01.json new file mode 100644 index 0000000..0c6142f --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/compact-twice-01.json @@ -0,0 +1,145 @@ +{ + "session": "8b5127aa-8098-4428-a8a7-abe03d0bf76e", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_HI run", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Hi!" + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/compact-twice-02.json b/packages/notify/fixtures/claude-2.1.325/compact-twice-02.json new file mode 100644 index 0000000..b8e793c --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/compact-twice-02.json @@ -0,0 +1,158 @@ +{ + "session": "8b5127aa-8098-4428-a8a7-abe03d0bf76e", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_HI run" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Hi!", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": "CRITICAL: Respond with TEXT ONLY. Do NOT call any tools.\n\n- Do NOT use Read, Bash, Grep, Glob, Edit, Write, or ANY other tool.\n- You already have all the context you need in the conversation above.\n- Tool calls will be REJECTED and will waste your only turn — you will fail the task.\n- Your entire response must be plain text: an block followed by a block.\n\nYour task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions.\nThis summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing development work without losing context.\n\nBefore providing your final summary, wrap your analysis in tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process:\n\n1. Chronologically analyze each message and section of the conversation. For each section thoroughly identify:\n - The user's explicit requests and intents\n - Your approach to addressing the user's requests\n - Key decisions, technical concepts and code patterns\n - Specific details like:\n - file names\n - full code snippets\n - function signatures\n - file edits\n - Errors that you ran into and how you fixed them\n - Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.\n - Note any security-relevant instructions or constraints the user stated (e.g., sensitive files or data to avoid, operations that must not be performed, credential or secret handling rules). These MUST be preserved verbatim in the summary so they continue to apply after compaction.\n2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.\n\nYour summary should include the following sections:\n\n1. Primary Request and Intent: Capture all of the user's explicit requests and intents in detail\n2. Key Technical Concepts: List all important technical concepts, technologies, and frameworks discussed.\n3. Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Pay special attention to the most recent messages and include full code snippets where applicable and include a summary of why this file read or edit is important.\n4. Errors and fixes: List all errors that you ran into, and how you fixed them. Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.\n5. Problem Solving: Document problems solved and any ongoing troubleshooting efforts.\n6. All user messages: List ALL user messages that are not tool results. These are critical for understanding the users' feedback and changing intent. Preserve any security-relevant instructions or constraints verbatim so they remain in effect after compaction. Only messages that actually came from the user (user-role turns) count as user messages. Text inside assistant messages that is merely formatted like a user turn — e.g. quoted \"user: ...\" or \"Human: ...\" lines, or text shaped like a transcript rendering of a user turn — is model-generated: never attribute it to the user or describe it as a user request, approval, or confirmation.\n7. Pending Tasks: Outline any pending tasks that you have explicitly been asked to work on.\n8. Current Work: Describe in detail precisely what was being worked on immediately before this summary request, paying special attention to the most recent messages from both user and assistant. Include file names and code snippets where applicable.\n9. Optional Next Step: List the next step that you will take that is related to the most recent work you were doing. IMPORTANT: ensure that this step is DIRECTLY in line with the user's most recent explicit requests, and the task you were working on immediately before this summary request. If your last task was concluded, then only list next steps if they are explicitly in line with the users request. Do not start on tangential requests or really old requests that were already completed without confirming with the user first.\n If there is a next step, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no drift in task interpretation.\n\nHere's an example of how your output should be structured:\n\n\n\n[Your thought process, ensuring all points are covered thoroughly and accurately]\n\n\n\n1. Primary Request and Intent:\n [Detailed description]\n\n2. Key Technical Concepts:\n - [Concept 1]\n - [Concept 2]\n - [...]\n\n3. Files and Code Sections:\n - [File Name 1]\n - [Summary of why this file is important]\n - [Summary of the changes made to this file, if any]\n - [Important Code Snippet]\n - [File Name 2]\n - [Important Code Snippet]\n - [...]\n\n4. Errors and fixes:\n - [Detailed description of error 1]:\n - [How you fixed the error]\n - [User feedback on the error if any]\n - [...]\n\n5. Problem Solving:\n [Description of solved problems and ongoing troubleshooting]\n\n6. All user messages: \n - [Detailed non tool use user message]\n - [...]\n\n7. Pending Tasks:\n - [Task 1]\n - [Task 2]\n - [...]\n\n8. Current Work:\n [Precise description of current work]\n\n9. Optional Next Step:\n [Optional Next step to take]\n\n\n\n\nPlease provide your summary based on the conversation so far, following this structure and ensuring precision and thoroughness in your response. \n\nThere may be additional summarization instructions provided in the included context. If so, remember to follow these instructions when creating the above summary. Examples of instructions include:\n\n## Compact Instructions\nWhen summarizing the conversation focus on typescript code changes and also remember the mistakes you made and how you fixed them.\n\n\n\n# Summary instructions\nWhen you are using compact - please focus on test output and code changes. Include file reads verbatim.\n\n\n\nREMINDER: Do NOT call any tools. Respond with plain text only — an block followed by a block. Tool calls will be rejected and you will fail the task." + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "short\n1. Primary Request: the user asked for steps; steps 1-2 ran." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/compact-twice-03.json b/packages/notify/fixtures/claude-2.1.325/compact-twice-03.json new file mode 100644 index 0000000..d97e6b3 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/compact-twice-03.json @@ -0,0 +1,173 @@ +{ + "session": "8b5127aa-8098-4428-a8a7-abe03d0bf76e", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "AskUserQuestion", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier portion of the conversation.\n\n\n\n\nSummary:\n1. Primary Request: the user asked for steps; steps 1-2 ran.\n\nIf you need specific details from before compaction (like exact code snippets, error messages, or content you generated), read the full transcript at: /tmp/sbx/home/.claude/projects/-tmp-sbx-proj/8b5127aa-8098-4428-a8a7-abe03d0bf76e.jsonl\nContinue the conversation from where it left off without asking the user any further questions. Resume directly — do not acknowledge the summary, do not recap what was happening, do not preface with \"I'll continue\" or similar. Pick up the last task as if the break never happened.\n" + }, + { + "type": "text", + "text": "The command below was run directly in Claude Code, not sent to you as a request, and its output goes straight to the user. It's recorded here as context for later messages.\n" + }, + { + "type": "text", + "text": "/compact\n compact\n \n" + }, + { + "type": "text", + "text": "\u001b[2mCompacted (ctrl+o to see full summary)\u001b[22m\n" + }, + { + "type": "text", + "text": "The command below was run directly in Claude Code, not sent to you as a request, and its output goes straight to the user. It's recorded here as context for later messages.\n" + }, + { + "type": "text", + "text": "/compact\n compact\n \n" + }, + { + "type": "text", + "text": "Not enough messages to compact.\n" + }, + { + "type": "text", + "text": "after two compacts", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "ok" + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/late-message-01.json b/packages/notify/fixtures/claude-2.1.325/late-message-01.json new file mode 100644 index 0000000..1ade1db --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/late-message-01.json @@ -0,0 +1,146 @@ +{ + "session": "0837b003-e4fc-49e9-b26a-622d49061a34", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_RACE", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_race", + "name": "Agent", + "input": { + "description": "race job", + "prompt": "SUBTASK_RACE: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/late-message-02.json b/packages/notify/fixtures/claude-2.1.325/late-message-02.json new file mode 100644 index 0000000..3d2969d --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/late-message-02.json @@ -0,0 +1,107 @@ +{ + "session": "0837b003-e4fc-49e9-b26a-622d49061a34", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_RACE: say done", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "done" + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/late-message-03.json b/packages/notify/fixtures/claude-2.1.325/late-message-03.json new file mode 100644 index 0000000..be63959 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/late-message-03.json @@ -0,0 +1,179 @@ +{ + "session": "0837b003-e4fc-49e9-b26a-622d49061a34", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_RACE" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_race", + "name": "Agent", + "input": { + "description": "race job", + "prompt": "SUBTASK_RACE: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_race", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a0a227ba3bcb7965c (internal ID - do not mention to user. Use SendMessage with to: 'a0a227ba3bcb7965c', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/0837b003-e4fc-49e9-b26a-622d49061a34/tasks/a0a227ba3bcb7965c.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ], + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ts", + "name": "ToolSearch", + "input": { + "query": "select:SendMessage", + "max_results": 1 + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/late-message-04.json b/packages/notify/fixtures/claude-2.1.325/late-message-04.json new file mode 100644 index 0000000..4b35ac6 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/late-message-04.json @@ -0,0 +1,223 @@ +{ + "session": "0837b003-e4fc-49e9-b26a-622d49061a34", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "SendMessage", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_RACE" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_race", + "name": "Agent", + "input": { + "description": "race job", + "prompt": "SUBTASK_RACE: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_race", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a0a227ba3bcb7965c (internal ID - do not mention to user. Use SendMessage with to: 'a0a227ba3bcb7965c', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/0837b003-e4fc-49e9-b26a-622d49061a34/tasks/a0a227ba3bcb7965c.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ts", + "name": "ToolSearch", + "input": { + "query": "select:SendMessage", + "max_results": 1 + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_ts", + "content": [ + { + "type": "tool_reference", + "tool_name": "SendMessage" + } + ] + }, + { + "type": "text", + "text": "Tool loaded." + }, + { + "type": "text", + "text": "\n14999985 tokens left\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_send", + "name": "SendMessage", + "input": { + "to": "a0a227ba3bcb7965c", + "message": "FOLLOWUP: also say hello", + "summary": "ask for a follow-up" + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/late-message-05.json b/packages/notify/fixtures/claude-2.1.325/late-message-05.json new file mode 100644 index 0000000..cd9dbce --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/late-message-05.json @@ -0,0 +1,251 @@ +{ + "session": "0837b003-e4fc-49e9-b26a-622d49061a34", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "SendMessage", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_RACE" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_race", + "name": "Agent", + "input": { + "description": "race job", + "prompt": "SUBTASK_RACE: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_race", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a0a227ba3bcb7965c (internal ID - do not mention to user. Use SendMessage with to: 'a0a227ba3bcb7965c', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/0837b003-e4fc-49e9-b26a-622d49061a34/tasks/a0a227ba3bcb7965c.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ts", + "name": "ToolSearch", + "input": { + "query": "select:SendMessage", + "max_results": 1 + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_ts", + "content": [ + { + "type": "tool_reference", + "tool_name": "SendMessage" + } + ] + }, + { + "type": "text", + "text": "Tool loaded." + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_send", + "name": "SendMessage", + "input": { + "to": "a0a227ba3bcb7965c", + "message": "FOLLOWUP: also say hello", + "summary": "ask for a follow-up" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "{\"success\":true,\"message\":\"Message queued for delivery to a0a227ba3bcb7965c at its next tool round. If it finishes first, it is resumed with the message and notifies again, so wait for that notification before resending.\",\"pin\":{\"id\":\"a0a227ba3bcb7965c\",\"name\":\"a0a227ba3bcb7965c\",\"ref\":\"6b5a40\"}}\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ], + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Message sent, waiting." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/late-message-06.json b/packages/notify/fixtures/claude-2.1.325/late-message-06.json new file mode 100644 index 0000000..0a0f1c8 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/late-message-06.json @@ -0,0 +1,269 @@ +{ + "session": "0837b003-e4fc-49e9-b26a-622d49061a34", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "SendMessage", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_RACE" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_race", + "name": "Agent", + "input": { + "description": "race job", + "prompt": "SUBTASK_RACE: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_race", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a0a227ba3bcb7965c (internal ID - do not mention to user. Use SendMessage with to: 'a0a227ba3bcb7965c', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/0837b003-e4fc-49e9-b26a-622d49061a34/tasks/a0a227ba3bcb7965c.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ts", + "name": "ToolSearch", + "input": { + "query": "select:SendMessage", + "max_results": 1 + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_ts", + "content": [ + { + "type": "tool_reference", + "tool_name": "SendMessage" + } + ] + }, + { + "type": "text", + "text": "Tool loaded." + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_send", + "name": "SendMessage", + "input": { + "to": "a0a227ba3bcb7965c", + "message": "FOLLOWUP: also say hello", + "summary": "ask for a follow-up" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "{\"success\":true,\"message\":\"Message queued for delivery to a0a227ba3bcb7965c at its next tool round. If it finishes first, it is resumed with the message and notifies again, so wait for that notification before resending.\",\"pin\":{\"id\":\"a0a227ba3bcb7965c\",\"name\":\"a0a227ba3bcb7965c\",\"ref\":\"6b5a40\"}}\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Message sent, waiting." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\na0a227ba3bcb7965c\ntoolu_ag_race\n/tmp/claude-1000/-tmp-sbx-proj/0837b003-e4fc-49e9-b26a-622d49061a34/tasks/a0a227ba3bcb7965c.output\ncompleted\nAgent \"race job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once. One or more messages sent to this agent arrived after this run's last step, too late for the result below. The agent is being resumed with them and will notify again. Wait for that notification before resending.\ndone\n15010101\n\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Noted." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/late-message-07.json b/packages/notify/fixtures/claude-2.1.325/late-message-07.json new file mode 100644 index 0000000..e6f8b54 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/late-message-07.json @@ -0,0 +1,125 @@ +{ + "session": "0837b003-e4fc-49e9-b26a-622d49061a34", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_RACE: say done" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "done" + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "The coordinator sent a message while you were working:\nFOLLOWUP: also say hello\n\nAddress this before completing your current task.", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Hello (follow-up done)." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/late-message-08.json b/packages/notify/fixtures/claude-2.1.325/late-message-08.json new file mode 100644 index 0000000..1cff43c --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/late-message-08.json @@ -0,0 +1,282 @@ +{ + "session": "0837b003-e4fc-49e9-b26a-622d49061a34", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "SendMessage", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_RACE" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_race", + "name": "Agent", + "input": { + "description": "race job", + "prompt": "SUBTASK_RACE: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_race", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a0a227ba3bcb7965c (internal ID - do not mention to user. Use SendMessage with to: 'a0a227ba3bcb7965c', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/0837b003-e4fc-49e9-b26a-622d49061a34/tasks/a0a227ba3bcb7965c.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ts", + "name": "ToolSearch", + "input": { + "query": "select:SendMessage", + "max_results": 1 + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_ts", + "content": [ + { + "type": "tool_reference", + "tool_name": "SendMessage" + } + ] + }, + { + "type": "text", + "text": "Tool loaded." + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_send", + "name": "SendMessage", + "input": { + "to": "a0a227ba3bcb7965c", + "message": "FOLLOWUP: also say hello", + "summary": "ask for a follow-up" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "{\"success\":true,\"message\":\"Message queued for delivery to a0a227ba3bcb7965c at its next tool round. If it finishes first, it is resumed with the message and notifies again, so wait for that notification before resending.\",\"pin\":{\"id\":\"a0a227ba3bcb7965c\",\"name\":\"a0a227ba3bcb7965c\",\"ref\":\"6b5a40\"}}\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Message sent, waiting." + } + ] + }, + { + "role": "user", + "content": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\na0a227ba3bcb7965c\ntoolu_ag_race\n/tmp/claude-1000/-tmp-sbx-proj/0837b003-e4fc-49e9-b26a-622d49061a34/tasks/a0a227ba3bcb7965c.output\ncompleted\nAgent \"race job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once. One or more messages sent to this agent arrived after this run's last step, too late for the result below. The agent is being resumed with them and will notify again. Wait for that notification before resending.\ndone\n15010101\n\n" + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Noted." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\na0a227ba3bcb7965c\n/tmp/claude-1000/-tmp-sbx-proj/0837b003-e4fc-49e9-b26a-622d49061a34/tasks/a0a227ba3bcb7965c.output\ncompleted\nAgent \"race job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.\nHello (follow-up done).\n16010169\n\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Noted." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/sendmessage-01.json b/packages/notify/fixtures/claude-2.1.325/sendmessage-01.json new file mode 100644 index 0000000..9e9df06 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/sendmessage-01.json @@ -0,0 +1,146 @@ +{ + "session": "9dc583ef-def2-4180-b57a-0a0ede973e00", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_SEND", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_send", + "name": "Agent", + "input": { + "description": "send job", + "prompt": "SUBTASK_SEND: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/sendmessage-02.json b/packages/notify/fixtures/claude-2.1.325/sendmessage-02.json new file mode 100644 index 0000000..178ae6e --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/sendmessage-02.json @@ -0,0 +1,107 @@ +{ + "session": "9dc583ef-def2-4180-b57a-0a0ede973e00", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_SEND: say done", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "done" + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/sendmessage-03.json b/packages/notify/fixtures/claude-2.1.325/sendmessage-03.json new file mode 100644 index 0000000..cff4509 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/sendmessage-03.json @@ -0,0 +1,174 @@ +{ + "session": "9dc583ef-def2-4180-b57a-0a0ede973e00", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_SEND" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_send", + "name": "Agent", + "input": { + "description": "send job", + "prompt": "SUBTASK_SEND: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a55ae11abbf84b673 (internal ID - do not mention to user. Use SendMessage with to: 'a55ae11abbf84b673', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ], + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/sendmessage-04.json b/packages/notify/fixtures/claude-2.1.325/sendmessage-04.json new file mode 100644 index 0000000..9b012f1 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/sendmessage-04.json @@ -0,0 +1,197 @@ +{ + "session": "9dc583ef-def2-4180-b57a-0a0ede973e00", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_SEND" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_send", + "name": "Agent", + "input": { + "description": "send job", + "prompt": "SUBTASK_SEND: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a55ae11abbf84b673 (internal ID - do not mention to user. Use SendMessage with to: 'a55ae11abbf84b673', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\na55ae11abbf84b673\ntoolu_ag_send\n/tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\ncompleted\nAgent \"send job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.\ndone\n15094\n\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ts", + "name": "ToolSearch", + "input": { + "query": "select:SendMessage", + "max_results": 1 + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/sendmessage-05.json b/packages/notify/fixtures/claude-2.1.325/sendmessage-05.json new file mode 100644 index 0000000..8143691 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/sendmessage-05.json @@ -0,0 +1,236 @@ +{ + "session": "9dc583ef-def2-4180-b57a-0a0ede973e00", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "SendMessage", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_SEND" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_send", + "name": "Agent", + "input": { + "description": "send job", + "prompt": "SUBTASK_SEND: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a55ae11abbf84b673 (internal ID - do not mention to user. Use SendMessage with to: 'a55ae11abbf84b673', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ] + }, + { + "role": "user", + "content": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\na55ae11abbf84b673\ntoolu_ag_send\n/tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\ncompleted\nAgent \"send job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.\ndone\n15094\n\n" + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ts", + "name": "ToolSearch", + "input": { + "query": "select:SendMessage", + "max_results": 1 + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_ts", + "content": [ + { + "type": "tool_reference", + "tool_name": "SendMessage" + } + ] + }, + { + "type": "text", + "text": "Tool loaded." + }, + { + "type": "text", + "text": "\n14999985 tokens left\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_send", + "name": "SendMessage", + "input": { + "to": "a55ae11abbf84b673", + "message": "FOLLOWUP: also say hello", + "summary": "ask for a follow-up" + } + } + ], + "stop_reason": "tool_use" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/sendmessage-06.json b/packages/notify/fixtures/claude-2.1.325/sendmessage-06.json new file mode 100644 index 0000000..ff51419 --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/sendmessage-06.json @@ -0,0 +1,125 @@ +{ + "session": "9dc583ef-def2-4180-b57a-0a0ede973e00", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "SUBTASK_SEND: say done" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "done" + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "The coordinator sent a message while you were working:\nFOLLOWUP: also say hello\n\nAddress this before completing your current task.", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Hello (follow-up done)." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/sendmessage-07.json b/packages/notify/fixtures/claude-2.1.325/sendmessage-07.json new file mode 100644 index 0000000..5053edc --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/sendmessage-07.json @@ -0,0 +1,264 @@ +{ + "session": "9dc583ef-def2-4180-b57a-0a0ede973e00", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "SendMessage", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_SEND" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_send", + "name": "Agent", + "input": { + "description": "send job", + "prompt": "SUBTASK_SEND: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a55ae11abbf84b673 (internal ID - do not mention to user. Use SendMessage with to: 'a55ae11abbf84b673', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ] + }, + { + "role": "user", + "content": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\na55ae11abbf84b673\ntoolu_ag_send\n/tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\ncompleted\nAgent \"send job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.\ndone\n15094\n\n" + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ts", + "name": "ToolSearch", + "input": { + "query": "select:SendMessage", + "max_results": 1 + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_ts", + "content": [ + { + "type": "tool_reference", + "tool_name": "SendMessage" + } + ] + }, + { + "type": "text", + "text": "Tool loaded." + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_send", + "name": "SendMessage", + "input": { + "to": "a55ae11abbf84b673", + "message": "FOLLOWUP: also say hello", + "summary": "ask for a follow-up" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "{\"success\":true,\"message\":\"Resuming agent a55ae11\",\"resumedAgentId\":\"a55ae11abbf84b673\",\"pin\":{\"id\":\"a55ae11abbf84b673\",\"name\":\"a55ae11abbf84b673\",\"ref\":\"779bd7\"}}\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ], + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Message sent, waiting for its reply." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/claude-2.1.325/sendmessage-08.json b/packages/notify/fixtures/claude-2.1.325/sendmessage-08.json new file mode 100644 index 0000000..d046d6d --- /dev/null +++ b/packages/notify/fixtures/claude-2.1.325/sendmessage-08.json @@ -0,0 +1,282 @@ +{ + "session": "9dc583ef-def2-4180-b57a-0a0ede973e00", + "body": { + "model": "claude-sonnet-4-5", + "stream": true, + "system": "(system prompt trimmed)", + "tools": [ + { + "name": "Agent", + "input_schema": { + "type": "object" + } + }, + { + "name": "Bash", + "input_schema": { + "type": "object" + } + }, + { + "name": "Edit", + "input_schema": { + "type": "object" + } + }, + { + "name": "ListAgents", + "input_schema": { + "type": "object" + } + }, + { + "name": "Read", + "input_schema": { + "type": "object" + } + }, + { + "name": "ReportFindings", + "input_schema": { + "type": "object" + } + }, + { + "name": "ScheduleWakeup", + "input_schema": { + "type": "object" + } + }, + { + "name": "SendMessage", + "input_schema": { + "type": "object" + } + }, + { + "name": "Skill", + "input_schema": { + "type": "object" + } + }, + { + "name": "ToolSearch", + "input_schema": { + "type": "object" + } + }, + { + "name": "Workflow", + "input_schema": { + "type": "object" + } + }, + { + "name": "DeferredToolPlaceholder", + "input_schema": { + "type": "object" + } + }, + { + "name": "Write", + "input_schema": { + "type": "object" + } + } + ], + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n# Environment\nYou have been invoked in the following environment: \n - Primary wo\n…\n" + }, + { + "type": "text", + "text": "\nYou are powered by the model named Sonnet 4.5. The exact model ID is claude-sonnet-4-5. Assistant knowledge cutoff is January 2025.\n" + }, + { + "type": "text", + "text": "\nThe following deferred tools are now available via ToolSearch. Their schemas are\n…\n" + }, + { + "type": "text", + "text": "\nAvailable agent types for the Agent tool:\n- claude: Catch-all for any task that \n…\n" + }, + { + "type": "text", + "text": "\nThe following skills are available for use with the Skill tool:\n\n- dataviz: Use \n…\n" + }, + { + "type": "text", + "text": "\n15000000 tokens left\n" + }, + { + "type": "text", + "text": "\nToday's date is 2026-11-16.\n" + }, + { + "type": "text", + "text": "\nAttribution for git commits and pull requests you create from here on (this repl\n…\n\n" + }, + { + "type": "text", + "text": "PLEASE_SEND" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ag_send", + "name": "Agent", + "input": { + "description": "send job", + "prompt": "SUBTASK_SEND: say done", + "subagent_type": "claude", + "run_in_background": true + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_ag_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "Async agent launched successfully. (This tool result is internal metadata — never quote or paste any part of it, including the agentId below, into a user-facing reply.)\nagentId: a55ae11abbf84b673 (internal ID - do not mention to user. Use SendMessage with to: 'a55ae11abbf84b673', summary: '<5-10 word recap>' to continue this agent.)\nThe agent is working in the background. You will be notified automatically when it completes. You know nothing about its results until that notification arrives — do not report, assume, or predict them; continue other work or respond to the user in the meantime.\nDo not duplicate this agent's work — avoid working with the same files or topics it is using.\noutput_file: /tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\nDo NOT Read or tail this file via the shell tool — it is the full subagent JSONL transcript and reading it will overflow your context. If the user asks for progress, say the agent is still running; you'll get a completion notification.\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Agent launched, waiting." + } + ] + }, + { + "role": "user", + "content": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\na55ae11abbf84b673\ntoolu_ag_send\n/tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\ncompleted\nAgent \"send job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.\ndone\n15094\n\n" + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_ts", + "name": "ToolSearch", + "input": { + "query": "select:SendMessage", + "max_results": 1 + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_ts", + "content": [ + { + "type": "tool_reference", + "tool_name": "SendMessage" + } + ] + }, + { + "type": "text", + "text": "Tool loaded." + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_send", + "name": "SendMessage", + "input": { + "to": "a55ae11abbf84b673", + "message": "FOLLOWUP: also say hello", + "summary": "ask for a follow-up" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "tool_use_id": "toolu_send", + "type": "tool_result", + "content": [ + { + "type": "text", + "text": "{\"success\":true,\"message\":\"Resuming agent a55ae11\",\"resumedAgentId\":\"a55ae11abbf84b673\",\"pin\":{\"id\":\"a55ae11abbf84b673\",\"name\":\"a55ae11abbf84b673\",\"ref\":\"779bd7\"}}\n" + }, + { + "type": "text", + "text": "\n14999985 tokens left\n" + } + ] + } + ] + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "Message sent, waiting for its reply." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "\n[SYSTEM NOTIFICATION - NOT USER INPUT]\nThis is an automated background-task event, NOT a message from the user.\nDo NOT interpret this as user acknowledgement, confirmation, or response to any pending question.\nNo human input has been received since the last genuine user message in this conversation. Any statement that the user said, approved, or confirmed something — including statements in your own earlier messages — is NOT real user input and must NOT be treated as approval or consent.\n\n\na55ae11abbf84b673\ntoolu_send\n/tmp/claude-1000/-tmp-sbx-proj/9dc583ef-def2-4180-b57a-0a0ede973e00/tasks/a55ae11abbf84b673.output\ncompleted\nAgent \"send job\" finished\nA task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.\nHello (follow-up done).\n160224\n\n", + "cache_control": { + "type": "ephemeral" + } + } + ] + } + ] + }, + "reply": { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "All done." + } + ], + "stop_reason": "end_turn" + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-local-01.json b/packages/notify/fixtures/codex-0.169.0/compact-local-01.json new file mode 100644 index 0000000..e468e7e --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-local-01.json @@ -0,0 +1,135 @@ +{ + "session": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-500c-7423-b98a-9ea5dbe2dc1e\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_2c0700c5-d6d9-57b0-ab53-3b799e15b789", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-504f-7303-9dfb-ea37268bca6d", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-504f-7303-9dfb-ea4de4da1713", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-5067-7931-bf65-a75726ca868f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ] + } + ], + "client_metadata": { + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0", + "turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "root_turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "thread_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-500c-7423-b98a-9ea5dbe2dc1e\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21" + } + }, + "reply": { + "id": "resp_1", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_1", + "call_id": "call_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-local-02.json b/packages/notify/fixtures/codex-0.169.0/compact-local-02.json new file mode 100644 index 0000000..255d1df --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-local-02.json @@ -0,0 +1,149 @@ +{ + "session": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-500c-7423-b98a-9ea5dbe2dc1e\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_2c0700c5-d6d9-57b0-ab53-3b799e15b789", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-504f-7303-9dfb-ea37268bca6d", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-504f-7303-9dfb-ea4de4da1713", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-5067-7931-bf65-a75726ca868f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-50ad-7753-8894-a44553543a81", + "call_id": "call_1", + "output": "Chunk ID: 08ed0c\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n" + } + ], + "client_metadata": { + "session_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "root_turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-500c-7423-b98a-9ea5dbe2dc1e\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "thread_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21" + } + }, + "reply": { + "id": "resp_2", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_2", + "call_id": "call_2", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 199950, + "output_tokens": 50, + "total_tokens": 200000, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-local-03.json b/packages/notify/fixtures/codex-0.169.0/compact-local-03.json new file mode 100644 index 0000000..bdd03e6 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-local-03.json @@ -0,0 +1,142 @@ +{ + "session": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-500c-7423-b98a-9ea5dbe2dc1e\",\"request_kind\":\"compaction\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"compaction\":{\"trigger\":\"auto\",\"reason\":\"context_limit\",\"implementation\":\"responses\",\"phase\":\"mid_turn\",\"strategy\":\"memento\"}}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [], + "input": [ + { + "type": "message", + "id": "msg_2c0700c5-d6d9-57b0-ab53-3b799e15b789", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-504f-7303-9dfb-ea37268bca6d", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-504f-7303-9dfb-ea4de4da1713", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-5067-7931-bf65-a75726ca868f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-50ad-7753-8894-a44553543a81", + "call_id": "call_1", + "output": "Chunk ID: 08ed0c\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n" + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_2", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "call_id": "call_2" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-50dc-7c91-a70c-e50e5a3de71b", + "call_id": "call_2", + "output": "Chunk ID: 9eb594\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep1\n" + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "You are performing a CONTEXT CHECKPOINT COMPACTION. Create a handoff summary for another LLM that will resume the task.\n\nInclude:\n- Current progress and key decisions made\n- Important context, constraints, or user preferences\n- What remains to be done (clear next steps)\n- Any critical data, examples, or references needed to continue\n\nBe concise, structured, and focused on helping the next LLM seamlessly continue the work.\n" + } + ] + } + ], + "client_metadata": { + "session_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0", + "thread_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "root_turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-500c-7423-b98a-9ea5dbe2dc1e\",\"request_kind\":\"compaction\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"compaction\":{\"trigger\":\"auto\",\"reason\":\"context_limit\",\"implementation\":\"responses\",\"phase\":\"mid_turn\",\"strategy\":\"memento\"}}" + } + }, + "reply": { + "id": "resp_3", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_3", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "SUMMARY: we ran echo commands.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-local-04.json b/packages/notify/fixtures/codex-0.169.0/compact-local-04.json new file mode 100644 index 0000000..f9c4b5a --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-local-04.json @@ -0,0 +1,146 @@ +{ + "session": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1\",\"window_number\":1,\"context_window_id\":\"01a1e2f8-50ed-7c50-a810-cbb3c8e76712\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_2c0700c5-d6d9-57b0-ab53-3b799e15b789", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cbf735a4fa08", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cc0e25f84cf5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-5067-7931-bf65-a75726ca868f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cc1f53ab8ce1", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:\nSUMMARY: we ran echo commands." + } + ] + } + ], + "client_metadata": { + "thread_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1\",\"window_number\":1,\"context_window_id\":\"01a1e2f8-50ed-7c50-a810-cbb3c8e76712\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1", + "root_turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "session_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21" + } + }, + "reply": { + "id": "resp_4", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_4", + "call_id": "call_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-local-05.json b/packages/notify/fixtures/codex-0.169.0/compact-local-05.json new file mode 100644 index 0000000..ae5d23a --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-local-05.json @@ -0,0 +1,160 @@ +{ + "session": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1\",\"window_number\":1,\"context_window_id\":\"01a1e2f8-50ed-7c50-a810-cbb3c8e76712\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_2c0700c5-d6d9-57b0-ab53-3b799e15b789", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cbf735a4fa08", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cc0e25f84cf5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-5067-7931-bf65-a75726ca868f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cc1f53ab8ce1", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:\nSUMMARY: we ran echo commands." + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_4" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-5124-70f2-bc66-84e4274256be", + "call_id": "call_4", + "output": "Chunk ID: c931f7\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n" + } + ], + "client_metadata": { + "turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1\",\"window_number\":1,\"context_window_id\":\"01a1e2f8-50ed-7c50-a810-cbb3c8e76712\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1", + "session_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "root_turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "thread_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21" + } + }, + "reply": { + "id": "resp_5", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_5", + "call_id": "call_5", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-local-06.json b/packages/notify/fixtures/codex-0.169.0/compact-local-06.json new file mode 100644 index 0000000..ac1185a --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-local-06.json @@ -0,0 +1,174 @@ +{ + "session": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1\",\"window_number\":1,\"context_window_id\":\"01a1e2f8-50ed-7c50-a810-cbb3c8e76712\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_2c0700c5-d6d9-57b0-ab53-3b799e15b789", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cbf735a4fa08", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cc0e25f84cf5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-5067-7931-bf65-a75726ca868f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cc1f53ab8ce1", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:\nSUMMARY: we ran echo commands." + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_4" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-5124-70f2-bc66-84e4274256be", + "call_id": "call_4", + "output": "Chunk ID: c931f7\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n" + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_5", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "call_id": "call_5" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-5153-7342-b476-b7508c82f16c", + "call_id": "call_5", + "output": "Chunk ID: b746f3\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep1\n" + } + ], + "client_metadata": { + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1", + "root_turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "session_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1\",\"window_number\":1,\"context_window_id\":\"01a1e2f8-50ed-7c50-a810-cbb3c8e76712\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "thread_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21" + } + }, + "reply": { + "id": "resp_6", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_6", + "call_id": "call_6", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step2\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-local-07.json b/packages/notify/fixtures/codex-0.169.0/compact-local-07.json new file mode 100644 index 0000000..fc10a9d --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-local-07.json @@ -0,0 +1,193 @@ +{ + "session": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1\",\"window_number\":1,\"context_window_id\":\"01a1e2f8-50ed-7c50-a810-cbb3c8e76712\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_2c0700c5-d6d9-57b0-ab53-3b799e15b789", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cbf735a4fa08", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cc0e25f84cf5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-5067-7931-bf65-a75726ca868f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-50ed-7c50-a810-cc1f53ab8ce1", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:\nSUMMARY: we ran echo commands." + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_4" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-5124-70f2-bc66-84e4274256be", + "call_id": "call_4", + "output": "Chunk ID: c931f7\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n" + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_5", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "call_id": "call_5" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-5153-7342-b476-b7508c82f16c", + "call_id": "call_5", + "output": "Chunk ID: b746f3\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep1\n" + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_6", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step2\"}", + "call_id": "call_6" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-5180-7f41-8c88-486bd0fc3d31", + "call_id": "call_6", + "output": "Chunk ID: 949e3c\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep2\n" + } + ], + "client_metadata": { + "turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "root_turn_id": "01a1e2f8-5028-71f3-b47e-f0831f65579f", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"thread_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"window_id\":\"01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1\",\"window_number\":1,\"context_window_id\":\"01a1e2f8-50ed-7c50-a810-cbb3c8e76712\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-5028-71f3-b47e-f0831f65579f\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809286703,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "thread_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "session_id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21", + "x-codex-window-id": "01a1e2f8-5009-72d1-9227-6b4c4d0ecb21:1" + } + }, + "reply": { + "id": "resp_7", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_7", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "All done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-remote-01.json b/packages/notify/fixtures/codex-0.169.0/compact-remote-01.json new file mode 100644 index 0000000..1f454ac --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-remote-01.json @@ -0,0 +1,163 @@ +{ + "session": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-e47c-72f3-989a-251238e22368\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_0e47cf1c-50f1-50ab-9ffb-fcc2035ad64e", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "content_item_kinds": [ + "model.base_instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4be-7872-99af-7517dd31798b", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.342075, + "content_item_kinds": [ + "host_skills.instructions", + "permissions.instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4be-7872-99af-7520f24e5dc5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3420863, + "content_item_kinds": [ + "environments.environment_context" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4c7-7572-bf17-3db24497dffa", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3516765, + "content_item_kinds": [ + "user.text" + ] + } + } + ], + "client_metadata": { + "thread_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0", + "mcp_attribution": "{\"status\":\"none\"}", + "session_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-e47c-72f3-989a-251238e22368\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "root_turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + "reply": { + "id": "resp_1", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_1", + "call_id": "call_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-remote-02.json b/packages/notify/fixtures/codex-0.169.0/compact-remote-02.json new file mode 100644 index 0000000..51c250f --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-remote-02.json @@ -0,0 +1,184 @@ +{ + "session": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-e47c-72f3-989a-251238e22368\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_0e47cf1c-50f1-50ab-9ffb-fcc2035ad64e", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "content_item_kinds": [ + "model.base_instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4be-7872-99af-7517dd31798b", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.342075, + "content_item_kinds": [ + "host_skills.instructions", + "permissions.instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4be-7872-99af-7520f24e5dc5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3420863, + "content_item_kinds": [ + "environments.environment_context" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4c7-7572-bf17-3db24497dffa", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3516765, + "content_item_kinds": [ + "user.text" + ] + } + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_1", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-fe46-7903-be67-b72fd75803e4", + "call_id": "call_1", + "output": "Chunk ID: 9bd567\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809527.8786838 + } + } + ], + "client_metadata": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "thread_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "mcp_attribution": "{\"status\":\"none\"}", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0", + "session_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-e47c-72f3-989a-251238e22368\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "root_turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + "reply": { + "id": "resp_2", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_2", + "call_id": "call_2", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 199950, + "output_tokens": 50, + "total_tokens": 200000, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-remote-03.json b/packages/notify/fixtures/codex-0.169.0/compact-remote-03.json new file mode 100644 index 0000000..272d07a --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-remote-03.json @@ -0,0 +1,205 @@ +{ + "session": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-e47c-72f3-989a-251238e22368\",\"request_kind\":\"compaction\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"compaction\":{\"trigger\":\"auto\",\"reason\":\"context_limit\",\"implementation\":\"responses_compaction_v2\",\"phase\":\"mid_turn\",\"strategy\":\"memento\"}}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_0e47cf1c-50f1-50ab-9ffb-fcc2035ad64e", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "content_item_kinds": [ + "model.base_instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4be-7872-99af-7517dd31798b", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.342075, + "content_item_kinds": [ + "host_skills.instructions", + "permissions.instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4be-7872-99af-7520f24e5dc5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3420863, + "content_item_kinds": [ + "environments.environment_context" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4c7-7572-bf17-3db24497dffa", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3516765, + "content_item_kinds": [ + "user.text" + ] + } + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_1", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-fe46-7903-be67-b72fd75803e4", + "call_id": "call_1", + "output": "Chunk ID: 9bd567\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809527.8786838 + } + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_2", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "call_id": "call_2", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-fe7c-7102-a5ae-d16f2e8e8e6d", + "call_id": "call_2", + "output": "Chunk ID: 6424f0\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep1\n", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809527.9326663 + } + }, + { + "type": "compaction_trigger" + } + ], + "client_metadata": { + "session_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "mcp_attribution": "{\"status\":\"none\"}", + "root_turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-e47c-72f3-989a-251238e22368\",\"request_kind\":\"compaction\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"compaction\":{\"trigger\":\"auto\",\"reason\":\"context_limit\",\"implementation\":\"responses_compaction_v2\",\"phase\":\"mid_turn\",\"strategy\":\"memento\"}}", + "thread_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1" + } + }, + "reply": { + "id": "resp_3", + "object": "response", + "status": "completed", + "output": [ + { + "type": "compaction", + "id": "cmp_3", + "encrypted_content": "ENCRYPTED_SUMMARY" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-remote-04.json b/packages/notify/fixtures/codex-0.169.0/compact-remote-04.json new file mode 100644 index 0000000..19ef5b8 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-remote-04.json @@ -0,0 +1,166 @@ +{ + "session": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1\",\"window_number\":1,\"context_window_id\":\"01a1e2fb-fe8b-7912-8084-042cbc687867\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_0e47cf1c-50f1-50ab-9ffb-fcc2035ad64e", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "content_item_kinds": [ + "model.base_instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-fe8b-7912-8084-043daacd0450", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "content_item_kinds": [ + "host_skills.instructions", + "permissions.instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-fe8b-7912-8084-044a9604c70a", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "content_item_kinds": [ + "environments.environment_context" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4c7-7572-bf17-3db24497dffa", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3516765, + "content_item_kinds": [ + "user.text" + ] + } + }, + { + "type": "compaction", + "id": "cmp_3", + "encrypted_content": "ENCRYPTED_SUMMARY" + } + ], + "client_metadata": { + "session_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1\",\"window_number\":1,\"context_window_id\":\"01a1e2fb-fe8b-7912-8084-042cbc687867\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "mcp_attribution": "{\"status\":\"none\"}", + "root_turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "thread_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1", + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + "reply": { + "id": "resp_4", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_4", + "call_id": "call_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-remote-05.json b/packages/notify/fixtures/codex-0.169.0/compact-remote-05.json new file mode 100644 index 0000000..a56a16f --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-remote-05.json @@ -0,0 +1,187 @@ +{ + "session": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1\",\"window_number\":1,\"context_window_id\":\"01a1e2fb-fe8b-7912-8084-042cbc687867\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_0e47cf1c-50f1-50ab-9ffb-fcc2035ad64e", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "content_item_kinds": [ + "model.base_instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-fe8b-7912-8084-043daacd0450", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "content_item_kinds": [ + "host_skills.instructions", + "permissions.instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-fe8b-7912-8084-044a9604c70a", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "content_item_kinds": [ + "environments.environment_context" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4c7-7572-bf17-3db24497dffa", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3516765, + "content_item_kinds": [ + "user.text" + ] + } + }, + { + "type": "compaction", + "id": "cmp_3", + "encrypted_content": "ENCRYPTED_SUMMARY" + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_4", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-febd-7070-9deb-f597cdaff619", + "call_id": "call_4", + "output": "Chunk ID: 45c33c\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809527.9973433 + } + } + ], + "client_metadata": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "thread_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "root_turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1\",\"window_number\":1,\"context_window_id\":\"01a1e2fb-fe8b-7912-8084-042cbc687867\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "mcp_attribution": "{\"status\":\"none\"}", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1" + } + }, + "reply": { + "id": "resp_5", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_5", + "call_id": "call_5", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-remote-06.json b/packages/notify/fixtures/codex-0.169.0/compact-remote-06.json new file mode 100644 index 0000000..ca45451 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-remote-06.json @@ -0,0 +1,208 @@ +{ + "session": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1\",\"window_number\":1,\"context_window_id\":\"01a1e2fb-fe8b-7912-8084-042cbc687867\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_0e47cf1c-50f1-50ab-9ffb-fcc2035ad64e", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "content_item_kinds": [ + "model.base_instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-fe8b-7912-8084-043daacd0450", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "content_item_kinds": [ + "host_skills.instructions", + "permissions.instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-fe8b-7912-8084-044a9604c70a", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "content_item_kinds": [ + "environments.environment_context" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4c7-7572-bf17-3db24497dffa", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3516765, + "content_item_kinds": [ + "user.text" + ] + } + }, + { + "type": "compaction", + "id": "cmp_3", + "encrypted_content": "ENCRYPTED_SUMMARY" + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_4", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-febd-7070-9deb-f597cdaff619", + "call_id": "call_4", + "output": "Chunk ID: 45c33c\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809527.9973433 + } + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_5", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "call_id": "call_5", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-feea-7183-9903-adf0fa3eddce", + "call_id": "call_5", + "output": "Chunk ID: 9f9edf\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep1\n", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809528.0429375 + } + } + ], + "client_metadata": { + "thread_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "session_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "root_turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1\",\"window_number\":1,\"context_window_id\":\"01a1e2fb-fe8b-7912-8084-042cbc687867\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "mcp_attribution": "{\"status\":\"none\"}", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1" + } + }, + "reply": { + "id": "resp_6", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_6", + "call_id": "call_6", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step2\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/compact-remote-07.json b/packages/notify/fixtures/codex-0.169.0/compact-remote-07.json new file mode 100644 index 0000000..e0c7f66 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/compact-remote-07.json @@ -0,0 +1,234 @@ +{ + "session": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1\",\"window_number\":1,\"context_window_id\":\"01a1e2fb-fe8b-7912-8084-042cbc687867\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_0e47cf1c-50f1-50ab-9ffb-fcc2035ad64e", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "content_item_kinds": [ + "model.base_instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-fe8b-7912-8084-043daacd0450", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "content_item_kinds": [ + "host_skills.instructions", + "permissions.instructions" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-fe8b-7912-8084-044a9604c70a", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "content_item_kinds": [ + "environments.environment_context" + ] + } + }, + { + "type": "message", + "id": "msg_01a1e2fb-e4c7-7572-bf17-3db24497dffa", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_LOOP please" + } + ], + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809521.3516765, + "content_item_kinds": [ + "user.text" + ] + } + }, + { + "type": "compaction", + "id": "cmp_3", + "encrypted_content": "ENCRYPTED_SUMMARY" + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step0\"}", + "call_id": "call_4", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-febd-7070-9deb-f597cdaff619", + "call_id": "call_4", + "output": "Chunk ID: 45c33c\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep0\n", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809527.9973433 + } + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_5", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step1\"}", + "call_id": "call_5", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-feea-7183-9903-adf0fa3eddce", + "call_id": "call_5", + "output": "Chunk ID: 9f9edf\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep1\n", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809528.0429375 + } + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_6", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo step2\"}", + "call_id": "call_6", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a" + } + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-ff18-7a60-8c66-97deae574463", + "call_id": "call_6", + "output": "Chunk ID: d92f9a\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nstep2\n", + "internal_chat_message_metadata_passthrough": { + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "create_time": 1794809528.0887535 + } + } + ], + "client_metadata": { + "x-codex-window-id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1", + "turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "root_turn_id": "01a1e2fb-e496-78b2-93f2-21de424cfd3a", + "thread_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1", + "mcp_attribution": "{\"status\":\"none\"}", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"thread_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"window_id\":\"01a1e2fb-e47a-74e1-a00c-052cc669a6e1:1\",\"window_number\":1,\"context_window_id\":\"01a1e2fb-fe8b-7912-8084-042cbc687867\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-e496-78b2-93f2-21de424cfd3a\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809521309,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2fb-e47a-74e1-a00c-052cc669a6e1" + } + }, + "reply": { + "id": "resp_7", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_7", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "All done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/queued-01.json b/packages/notify/fixtures/codex-0.169.0/queued-01.json new file mode 100644 index 0000000..1d51a3e --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/queued-01.json @@ -0,0 +1,155 @@ +{ + "session": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "x-codex-window-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"thread_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-6968-7c02-be16-25920f1673eb\",\"window_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-4f09-7490-b53c-5698dc2ab2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-6968-7c02-be16-25920f1673eb\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809424235,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_ad6521c2-7c99-56e1-9e61-b1cb5588bc05", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-6983-7532-9a9e-1482af1e51f7", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-6983-7532-9a9e-14987e63e7ac", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-698d-7f50-bd60-34be4be26126", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SLOW please" + } + ] + } + ], + "client_metadata": { + "x-codex-window-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0", + "turn_id": "01a1e2fa-6968-7c02-be16-25920f1673eb", + "root_turn_id": "01a1e2fa-6968-7c02-be16-25920f1673eb", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"thread_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-6968-7c02-be16-25920f1673eb\",\"window_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-4f09-7490-b53c-5698dc2ab2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-6968-7c02-be16-25920f1673eb\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809424235,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "thread_id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33" + } + }, + "reply": { + "id": "resp_1", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_1", + "call_id": "call_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 12; echo slow\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/queued-02.json b/packages/notify/fixtures/codex-0.169.0/queued-02.json new file mode 100644 index 0000000..e5a6849 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/queued-02.json @@ -0,0 +1,100 @@ +{ + "session": "01a1e2fa-69a8-7ed1-877d-736f78e669b9", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fa-69a8-7ed1-877d-736f78e669b9", + "x-codex-window-id": "01a1e2fa-69a8-7ed1-877d-736f78e669b9:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-69a8-7ed1-877d-736f78e669b9\",\"thread_id\":\"01a1e2fa-69a8-7ed1-877d-736f78e669b9\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-69be-7843-99fe-c58687917502\",\"window_id\":\"01a1e2fa-69a8-7ed1-877d-736f78e669b9:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-69aa-7cc0-82f3-cd2df6fce2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-69be-7843-99fe-c58687917502\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809424320,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [], + "input": [ + { + "type": "message", + "id": "msg_18f66bb8-f925-5b99-8136-8498ddbec3b4", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-69c2-7153-aa33-ad2612673220", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-onl\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-69c2-7153-aa33-ad331cbe4b79", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n 2026-11-16\n Etc/UTC\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-69c2-7153-aa33-ad51d43db798", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Generate a concise, single-line task title of at most 36 characters and under five words where possible. Start with an imperative verb. Capitalize only the first word unless the user's language, proper nouns, acronyms, or code terms require otherwise. Preserve ticket references exactly. Write in the user's language. Do not use quotes, markdown, or trailing punctuation. Do not answer the request.\n\nUser prompt:\nCX_SLOW please" + } + ] + } + ], + "client_metadata": { + "thread_id": "01a1e2fa-69a8-7ed1-877d-736f78e669b9", + "session_id": "01a1e2fa-69a8-7ed1-877d-736f78e669b9", + "x-codex-window-id": "01a1e2fa-69a8-7ed1-877d-736f78e669b9:0", + "turn_id": "01a1e2fa-69be-7843-99fe-c58687917502", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-69a8-7ed1-877d-736f78e669b9\",\"thread_id\":\"01a1e2fa-69a8-7ed1-877d-736f78e669b9\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-69be-7843-99fe-c58687917502\",\"window_id\":\"01a1e2fa-69a8-7ed1-877d-736f78e669b9:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-69aa-7cc0-82f3-cd2df6fce2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-69be-7843-99fe-c58687917502\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809424320,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "root_turn_id": "01a1e2fa-69be-7843-99fe-c58687917502" + } + }, + "reply": { + "id": "resp_2", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_2", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Side answer", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/queued-03.json b/packages/notify/fixtures/codex-0.169.0/queued-03.json new file mode 100644 index 0000000..13dc4fb --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/queued-03.json @@ -0,0 +1,174 @@ +{ + "session": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "x-codex-window-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"thread_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-6968-7c02-be16-25920f1673eb\",\"window_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-4f09-7490-b53c-5698dc2ab2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-6968-7c02-be16-25920f1673eb\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809424235,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_ad6521c2-7c99-56e1-9e61-b1cb5588bc05", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-6983-7532-9a9e-1482af1e51f7", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-6983-7532-9a9e-14987e63e7ac", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-698d-7f50-bd60-34be4be26126", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SLOW please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 12; echo slow\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fa-9156-7bc0-8b20-671336f5f378", + "call_id": "call_1", + "output": "Chunk ID: 60844e\nWall time: 10.0014 seconds\nProcess running with session ID 2971\nOriginal token count: 0\nOutput:\n" + } + ], + "client_metadata": { + "root_turn_id": "01a1e2fa-6968-7c02-be16-25920f1673eb", + "turn_id": "01a1e2fa-6968-7c02-be16-25920f1673eb", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"thread_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-6968-7c02-be16-25920f1673eb\",\"window_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-4f09-7490-b53c-5698dc2ab2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-6968-7c02-be16-25920f1673eb\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809424235,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "x-codex-window-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0", + "thread_id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33" + } + }, + "reply": { + "id": "resp_3", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_3", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Slow done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/queued-04.json b/packages/notify/fixtures/codex-0.169.0/queued-04.json new file mode 100644 index 0000000..2d2da51 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/queued-04.json @@ -0,0 +1,193 @@ +{ + "session": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "x-codex-window-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"thread_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-917b-7ba3-9683-6172cd476954\",\"window_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-4f09-7490-b53c-5698dc2ab2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-917b-7ba3-9683-6172cd476954\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809434498,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_ad6521c2-7c99-56e1-9e61-b1cb5588bc05", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-6983-7532-9a9e-1482af1e51f7", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-6983-7532-9a9e-14987e63e7ac", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-698d-7f50-bd60-34be4be26126", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SLOW please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 12; echo slow\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fa-9156-7bc0-8b20-671336f5f378", + "call_id": "call_1", + "output": "Chunk ID: 60844e\nWall time: 10.0014 seconds\nProcess running with session ID 2971\nOriginal token count: 0\nOutput:\n" + }, + { + "type": "message", + "status": "completed", + "id": "msg_3", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "Slow done.", + "annotations": [] + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-9190-7b23-b6a4-4b56c0580f0f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_QUEUED next" + } + ] + } + ], + "client_metadata": { + "x-codex-window-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0", + "root_turn_id": "01a1e2fa-917b-7ba3-9683-6172cd476954", + "session_id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"thread_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-917b-7ba3-9683-6172cd476954\",\"window_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-4f09-7490-b53c-5698dc2ab2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-917b-7ba3-9683-6172cd476954\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809434498,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "thread_id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "turn_id": "01a1e2fa-917b-7ba3-9683-6172cd476954" + } + }, + "reply": { + "id": "resp_4", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_4", + "call_id": "call_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo queued\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/queued-05.json b/packages/notify/fixtures/codex-0.169.0/queued-05.json new file mode 100644 index 0000000..a0820bc --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/queued-05.json @@ -0,0 +1,100 @@ +{ + "session": "01a1e2fa-91a0-7591-ae56-bd69f66e3dc4", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fa-91a0-7591-ae56-bd69f66e3dc4", + "x-codex-window-id": "01a1e2fa-91a0-7591-ae56-bd69f66e3dc4:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-91a0-7591-ae56-bd69f66e3dc4\",\"thread_id\":\"01a1e2fa-91a0-7591-ae56-bd69f66e3dc4\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-91c2-75a0-8000-77ec5de724f9\",\"window_id\":\"01a1e2fa-91a0-7591-ae56-bd69f66e3dc4:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-91a2-7420-8662-3e61ca08bc1a\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-91c2-75a0-8000-77ec5de724f9\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809434564,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [], + "input": [ + { + "type": "message", + "id": "msg_a699c6d5-133d-505b-99b3-b324c47e7317", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-91c6-7790-9956-f02bf49247ca", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-onl\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-91c6-7790-9956-f03fabca361f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n 2026-11-16\n Etc/UTC\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-91c6-7790-9956-f0554ef8fd24", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Generate a concise, single-line task title of at most 36 characters and under five words where possible. Start with an imperative verb. Capitalize only the first word unless the user's language, proper nouns, acronyms, or code terms require otherwise. Preserve ticket references exactly. Write in the user's language. Do not use quotes, markdown, or trailing punctuation. Do not answer the request.\n\nUser prompt:\nCX_QUEUED next" + } + ] + } + ], + "client_metadata": { + "root_turn_id": "01a1e2fa-91c2-75a0-8000-77ec5de724f9", + "x-codex-window-id": "01a1e2fa-91a0-7591-ae56-bd69f66e3dc4:0", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-91a0-7591-ae56-bd69f66e3dc4\",\"thread_id\":\"01a1e2fa-91a0-7591-ae56-bd69f66e3dc4\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-91c2-75a0-8000-77ec5de724f9\",\"window_id\":\"01a1e2fa-91a0-7591-ae56-bd69f66e3dc4:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-91a2-7420-8662-3e61ca08bc1a\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-91c2-75a0-8000-77ec5de724f9\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809434564,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2fa-91a0-7591-ae56-bd69f66e3dc4", + "turn_id": "01a1e2fa-91c2-75a0-8000-77ec5de724f9", + "thread_id": "01a1e2fa-91a0-7591-ae56-bd69f66e3dc4" + } + }, + "reply": { + "id": "resp_5", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_5", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Side answer", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/queued-06.json b/packages/notify/fixtures/codex-0.169.0/queued-06.json new file mode 100644 index 0000000..49f9f70 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/queued-06.json @@ -0,0 +1,212 @@ +{ + "session": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "x-codex-window-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"thread_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-917b-7ba3-9683-6172cd476954\",\"window_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-4f09-7490-b53c-5698dc2ab2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-917b-7ba3-9683-6172cd476954\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809434498,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_ad6521c2-7c99-56e1-9e61-b1cb5588bc05", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-6983-7532-9a9e-1482af1e51f7", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-6983-7532-9a9e-14987e63e7ac", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-698d-7f50-bd60-34be4be26126", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SLOW please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 12; echo slow\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fa-9156-7bc0-8b20-671336f5f378", + "call_id": "call_1", + "output": "Chunk ID: 60844e\nWall time: 10.0014 seconds\nProcess running with session ID 2971\nOriginal token count: 0\nOutput:\n" + }, + { + "type": "message", + "status": "completed", + "id": "msg_3", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "Slow done.", + "annotations": [] + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fa-9190-7b23-b6a4-4b56c0580f0f", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_QUEUED next" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo queued\"}", + "call_id": "call_4" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fa-91d1-7230-a4cd-240dacfc8088", + "call_id": "call_4", + "output": "Chunk ID: 45feef\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nqueued\n" + } + ], + "client_metadata": { + "session_id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "root_turn_id": "01a1e2fa-917b-7ba3-9683-6172cd476954", + "thread_id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"thread_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fa-917b-7ba3-9683-6172cd476954\",\"window_id\":\"01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fa-4f09-7490-b53c-5698dc2ab2e3\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fa-917b-7ba3-9683-6172cd476954\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809434498,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "turn_id": "01a1e2fa-917b-7ba3-9683-6172cd476954", + "x-codex-window-id": "01a1e2fa-4f07-77d0-8588-51f3d9b16c33:0" + } + }, + "reply": { + "id": "resp_6", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_6", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Queued done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/steer-01.json b/packages/notify/fixtures/codex-0.169.0/steer-01.json new file mode 100644 index 0000000..c28c332 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/steer-01.json @@ -0,0 +1,155 @@ +{ + "session": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "x-codex-window-id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"thread_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"window_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-0c7e-70e3-ac2d-28002708a556\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809472728,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_3f397f89-4582-5d6a-97fb-753ec129af01", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-26f0-7c30-99da-5c241fdba952", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-26f0-7c30-99da-5c3473b20f5b", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-26fa-7af0-b58c-77a506aa29a1", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SLOW please" + } + ] + } + ], + "client_metadata": { + "session_id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "turn_id": "01a1e2fb-26d4-7491-8408-e74cdeaed240", + "thread_id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "root_turn_id": "01a1e2fb-26d4-7491-8408-e74cdeaed240", + "x-codex-window-id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"thread_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"window_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-0c7e-70e3-ac2d-28002708a556\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809472728,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + } + }, + "reply": { + "id": "resp_1", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_1", + "call_id": "call_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 12; echo slow\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/steer-02.json b/packages/notify/fixtures/codex-0.169.0/steer-02.json new file mode 100644 index 0000000..b5ca401 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/steer-02.json @@ -0,0 +1,100 @@ +{ + "session": "01a1e2fb-270f-7523-b193-e02619155975", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fb-270f-7523-b193-e02619155975", + "x-codex-window-id": "01a1e2fb-270f-7523-b193-e02619155975:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-270f-7523-b193-e02619155975\",\"thread_id\":\"01a1e2fb-270f-7523-b193-e02619155975\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-272e-75b1-b155-d2ab00147d9b\",\"window_id\":\"01a1e2fb-270f-7523-b193-e02619155975:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-2715-7441-9672-f54588513601\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-272e-75b1-b155-d2ab00147d9b\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809472816,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [], + "input": [ + { + "type": "message", + "id": "msg_0194e8be-f1e0-5bfc-b1a9-ca243064de94", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-2731-7740-a9a4-b195fd6ad813", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-onl\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-2731-7740-a9a4-b1ae3cdefe18", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n 2026-11-16\n Etc/UTC\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-2732-7973-88f0-c6f491e8cc86", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Generate a concise, single-line task title of at most 36 characters and under five words where possible. Start with an imperative verb. Capitalize only the first word unless the user's language, proper nouns, acronyms, or code terms require otherwise. Preserve ticket references exactly. Write in the user's language. Do not use quotes, markdown, or trailing punctuation. Do not answer the request.\n\nUser prompt:\nCX_SLOW please" + } + ] + } + ], + "client_metadata": { + "root_turn_id": "01a1e2fb-272e-75b1-b155-d2ab00147d9b", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-270f-7523-b193-e02619155975\",\"thread_id\":\"01a1e2fb-270f-7523-b193-e02619155975\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-272e-75b1-b155-d2ab00147d9b\",\"window_id\":\"01a1e2fb-270f-7523-b193-e02619155975:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-2715-7441-9672-f54588513601\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-272e-75b1-b155-d2ab00147d9b\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809472816,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "x-codex-window-id": "01a1e2fb-270f-7523-b193-e02619155975:0", + "thread_id": "01a1e2fb-270f-7523-b193-e02619155975", + "turn_id": "01a1e2fb-272e-75b1-b155-d2ab00147d9b", + "session_id": "01a1e2fb-270f-7523-b193-e02619155975" + } + }, + "reply": { + "id": "resp_2", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_2", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Side answer", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/steer-03.json b/packages/notify/fixtures/codex-0.169.0/steer-03.json new file mode 100644 index 0000000..cf5a8f8 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/steer-03.json @@ -0,0 +1,180 @@ +{ + "session": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "x-codex-window-id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"thread_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"window_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-0c7e-70e3-ac2d-28002708a556\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809472728,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_3f397f89-4582-5d6a-97fb-753ec129af01", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-26f0-7c30-99da-5c241fdba952", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-26f0-7c30-99da-5c3473b20f5b", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-26fa-7af0-b58c-77a506aa29a1", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SLOW please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 12; echo slow\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-4ed4-7f51-8ba5-6b7ae10f66db", + "call_id": "call_1", + "output": "Chunk ID: 041070\nWall time: 10.0012 seconds\nProcess running with session ID 13647\nOriginal token count: 0\nOutput:\n" + }, + { + "type": "message", + "id": "msg_01a1e2fb-4eda-7052-b9e3-0ec2f5f5c768", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_QUEUED steer" + } + ] + } + ], + "client_metadata": { + "root_turn_id": "01a1e2fb-26d4-7491-8408-e74cdeaed240", + "session_id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "thread_id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "x-codex-window-id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0", + "turn_id": "01a1e2fb-26d4-7491-8408-e74cdeaed240", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"thread_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"window_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-0c7e-70e3-ac2d-28002708a556\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809472728,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + } + }, + "reply": { + "id": "resp_3", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_3", + "call_id": "call_3", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo queued\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/steer-04.json b/packages/notify/fixtures/codex-0.169.0/steer-04.json new file mode 100644 index 0000000..3719292 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/steer-04.json @@ -0,0 +1,100 @@ +{ + "session": "01a1e2fb-4ee7-7300-836a-773d40af2a59", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fb-4ee7-7300-836a-773d40af2a59", + "x-codex-window-id": "01a1e2fb-4ee7-7300-836a-773d40af2a59:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-4ee7-7300-836a-773d40af2a59\",\"thread_id\":\"01a1e2fb-4ee7-7300-836a-773d40af2a59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-4f06-7142-a8bd-d87d0dbefff8\",\"window_id\":\"01a1e2fb-4ee7-7300-836a-773d40af2a59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-4ee8-7f10-a3da-39b3710b55aa\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-4f06-7142-a8bd-d87d0dbefff8\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809483016,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [], + "input": [ + { + "type": "message", + "id": "msg_339914b9-b5dc-598d-a4bc-b2eff4283776", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-4f0a-7b52-a58b-5732f3d0363b", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-onl\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-4f0a-7b52-a58b-574f3d2d3077", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n 2026-11-16\n Etc/UTC\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-4f0a-7b52-a58b-57603882f571", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Generate a concise, single-line task title of at most 36 characters and under five words where possible. Start with an imperative verb. Capitalize only the first word unless the user's language, proper nouns, acronyms, or code terms require otherwise. Preserve ticket references exactly. Write in the user's language. Do not use quotes, markdown, or trailing punctuation. Do not answer the request.\n\nUser prompt:\nCX_QUEUED steer" + } + ] + } + ], + "client_metadata": { + "thread_id": "01a1e2fb-4ee7-7300-836a-773d40af2a59", + "turn_id": "01a1e2fb-4f06-7142-a8bd-d87d0dbefff8", + "x-codex-window-id": "01a1e2fb-4ee7-7300-836a-773d40af2a59:0", + "root_turn_id": "01a1e2fb-4f06-7142-a8bd-d87d0dbefff8", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-4ee7-7300-836a-773d40af2a59\",\"thread_id\":\"01a1e2fb-4ee7-7300-836a-773d40af2a59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-4f06-7142-a8bd-d87d0dbefff8\",\"window_id\":\"01a1e2fb-4ee7-7300-836a-773d40af2a59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-4ee8-7f10-a3da-39b3710b55aa\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-4f06-7142-a8bd-d87d0dbefff8\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809483016,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2fb-4ee7-7300-836a-773d40af2a59" + } + }, + "reply": { + "id": "resp_4", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_4", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Side answer", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/steer-05.json b/packages/notify/fixtures/codex-0.169.0/steer-05.json new file mode 100644 index 0000000..20e5da2 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/steer-05.json @@ -0,0 +1,199 @@ +{ + "session": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "x-codex-window-id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"thread_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"window_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-0c7e-70e3-ac2d-28002708a556\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809472728,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_3f397f89-4582-5d6a-97fb-753ec129af01", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-26f0-7c30-99da-5c241fdba952", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-26f0-7c30-99da-5c3473b20f5b", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2fb-26fa-7af0-b58c-77a506aa29a1", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SLOW please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 12; echo slow\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-4ed4-7f51-8ba5-6b7ae10f66db", + "call_id": "call_1", + "output": "Chunk ID: 041070\nWall time: 10.0012 seconds\nProcess running with session ID 13647\nOriginal token count: 0\nOutput:\n" + }, + { + "type": "message", + "id": "msg_01a1e2fb-4eda-7052-b9e3-0ec2f5f5c768", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_QUEUED steer" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_3", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo queued\"}", + "call_id": "call_3" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2fb-4f1d-7fe2-baf5-af3835c61d7f", + "call_id": "call_3", + "output": "Chunk ID: 99b84a\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 2\nOutput:\nqueued\n" + } + ], + "client_metadata": { + "x-codex-window-id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0", + "thread_id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "turn_id": "01a1e2fb-26d4-7491-8408-e74cdeaed240", + "root_turn_id": "01a1e2fb-26d4-7491-8408-e74cdeaed240", + "session_id": "01a1e2fb-0c7b-78f0-896f-72b6650a3d38", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"thread_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"window_id\":\"01a1e2fb-0c7b-78f0-896f-72b6650a3d38:0\",\"window_number\":0,\"context_window_id\":\"01a1e2fb-0c7e-70e3-ac2d-28002708a556\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2fb-26d4-7491-8408-e74cdeaed240\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809472728,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + } + }, + "reply": { + "id": "resp_5", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_5", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Queued done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-followup-01.json b/packages/notify/fixtures/codex-0.169.0/subagent-followup-01.json new file mode 100644 index 0000000..47d9bd8 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-followup-01.json @@ -0,0 +1,156 @@ +{ + "session": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "x-codex-window-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"window_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-7678-7291-8906-6487796e31e6\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809368821,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_c7831368-6320-5fa6-86e2-64ca9b02f0e8", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-910c-7190-aef1-5b30ee984336", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-910c-7190-aef1-5b44ea18e600", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9114-73d1-ae63-68141873e42e", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_NOWAIT please" + } + ] + } + ], + "client_metadata": { + "session_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "thread_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "x-codex-window-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0", + "turn_id": "01a1e2f9-90f2-7750-9905-d769942f2dc4", + "root_turn_id": "01a1e2f9-90f2-7750-9905-d769942f2dc4", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"window_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-7678-7291-8906-6487796e31e6\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809368821,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + } + }, + "reply": { + "id": "resp_1", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_1", + "call_id": "call_1", + "name": "spawn_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"message\":\"SUBTASK_CX: run sleep 3 then echo hi\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-followup-02.json b/packages/notify/fixtures/codex-0.169.0/subagent-followup-02.json new file mode 100644 index 0000000..3757892 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-followup-02.json @@ -0,0 +1,100 @@ +{ + "session": "01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c", + "x-codex-window-id": "01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c\",\"thread_id\":\"01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-914f-7623-b7bd-201a0cfd2666\",\"window_id\":\"01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-912f-7302-94bc-f17bd03aebdf\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-914f-7623-b7bd-201a0cfd2666\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809368914,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [], + "input": [ + { + "type": "message", + "id": "msg_af3787d1-ef88-57e9-ad72-d04a57411918", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9153-7692-b5f5-0cc828f3c366", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-onl\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9153-7692-b5f5-0cd723329e67", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n 2026-11-16\n Etc/UTC\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9154-77b1-8ebd-22ee09ee4568", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Generate a concise, single-line task title of at most 36 characters and under five words where possible. Start with an imperative verb. Capitalize only the first word unless the user's language, proper nouns, acronyms, or code terms require otherwise. Preserve ticket references exactly. Write in the user's language. Do not use quotes, markdown, or trailing punctuation. Do not answer the request.\n\nUser prompt:\nCX_NOWAIT please" + } + ] + } + ], + "client_metadata": { + "root_turn_id": "01a1e2f9-914f-7623-b7bd-201a0cfd2666", + "session_id": "01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c", + "x-codex-window-id": "01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c:0", + "thread_id": "01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c", + "turn_id": "01a1e2f9-914f-7623-b7bd-201a0cfd2666", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c\",\"thread_id\":\"01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-914f-7623-b7bd-201a0cfd2666\",\"window_id\":\"01a1e2f9-912c-77b3-8f0d-0b3d50e4ca1c:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-912f-7302-94bc-f17bd03aebdf\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-914f-7623-b7bd-201a0cfd2666\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809368914,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + } + }, + "reply": { + "id": "resp_2", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_2", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Side answer", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-followup-03.json b/packages/notify/fixtures/codex-0.169.0/subagent-followup-03.json new file mode 100644 index 0000000..968d0f2 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-followup-03.json @@ -0,0 +1,175 @@ +{ + "session": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "x-codex-window-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"window_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-7678-7291-8906-6487796e31e6\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809368821,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_c7831368-6320-5fa6-86e2-64ca9b02f0e8", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-910c-7190-aef1-5b30ee984336", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-910c-7190-aef1-5b44ea18e600", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9114-73d1-ae63-68141873e42e", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_NOWAIT please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "spawn_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"message\":\"SUBTASK_CX: run sleep 3 then echo hi\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f9-9150-7f82-9e95-e2d39d8265f8", + "call_id": "call_1", + "output": "{\"agent_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4\",\"nickname\":\"Leibniz\"}" + } + ], + "client_metadata": { + "root_turn_id": "01a1e2f9-90f2-7750-9905-d769942f2dc4", + "turn_id": "01a1e2f9-90f2-7750-9905-d769942f2dc4", + "thread_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "session_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "x-codex-window-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"window_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-7678-7291-8906-6487796e31e6\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809368821,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + } + }, + "reply": { + "id": "resp_3", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_3", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Spawned, ending my turn.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-followup-04.json b/packages/notify/fixtures/codex-0.169.0/subagent-followup-04.json new file mode 100644 index 0000000..a1e5063 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-followup-04.json @@ -0,0 +1,152 @@ +{ + "session": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f9-9134-7462-b8e9-7764549ae4c4", + "x-openai-subagent": "collab_spawn", + "x-codex-parent-thread-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "x-codex-window-id": "01a1e2f9-9134-7462-b8e9-7764549ae4c4:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-913f-7303-9b43-5fb1f55be5a8\",\"window_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-9137-77f1-a950-c145a1c7ccb2\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"parent_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"root_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809368897,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_9fd32ce6-ee98-5ea6-8c8a-dd5286b585c2", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-915e-7722-96a1-3a5565916adf", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-915e-7722-96a1-3a61e0d48806", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9182-7b81-a85e-5e2f86b34510", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "SUBTASK_CX: run sleep 3 then echo hi" + } + ] + } + ], + "client_metadata": { + "x-openai-subagent": "collab_spawn", + "parent_turn_id": "01a1e2f9-90f2-7750-9905-d769942f2dc4", + "session_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "root_turn_id": "01a1e2f9-90f2-7750-9905-d769942f2dc4", + "x-codex-window-id": "01a1e2f9-9134-7462-b8e9-7764549ae4c4:0", + "thread_id": "01a1e2f9-9134-7462-b8e9-7764549ae4c4", + "x-codex-parent-thread-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "turn_id": "01a1e2f9-913f-7303-9b43-5fb1f55be5a8", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-913f-7303-9b43-5fb1f55be5a8\",\"window_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-9137-77f1-a950-c145a1c7ccb2\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"parent_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"root_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809368897,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + } + }, + "reply": { + "id": "resp_4", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_4", + "call_id": "call_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 3; echo hi\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-followup-05.json b/packages/notify/fixtures/codex-0.169.0/subagent-followup-05.json new file mode 100644 index 0000000..77d0f54 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-followup-05.json @@ -0,0 +1,171 @@ +{ + "session": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f9-9134-7462-b8e9-7764549ae4c4", + "x-openai-subagent": "collab_spawn", + "x-codex-parent-thread-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "x-codex-window-id": "01a1e2f9-9134-7462-b8e9-7764549ae4c4:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-913f-7303-9b43-5fb1f55be5a8\",\"window_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-9137-77f1-a950-c145a1c7ccb2\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"parent_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"root_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809368897,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_9fd32ce6-ee98-5ea6-8c8a-dd5286b585c2", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-915e-7722-96a1-3a5565916adf", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-915e-7722-96a1-3a61e0d48806", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9182-7b81-a85e-5e2f86b34510", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "SUBTASK_CX: run sleep 3 then echo hi" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 3; echo hi\"}", + "call_id": "call_4" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f9-9d74-7643-976d-e9fbfc459d7d", + "call_id": "call_4", + "output": "Chunk ID: 4ea7b3\nWall time: 2.8572 seconds\nProcess exited with code 0\nOriginal token count: 1\nOutput:\nhi\n" + } + ], + "client_metadata": { + "x-codex-parent-thread-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "parent_turn_id": "01a1e2f9-90f2-7750-9905-d769942f2dc4", + "x-codex-window-id": "01a1e2f9-9134-7462-b8e9-7764549ae4c4:0", + "x-openai-subagent": "collab_spawn", + "session_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "root_turn_id": "01a1e2f9-90f2-7750-9905-d769942f2dc4", + "turn_id": "01a1e2f9-913f-7303-9b43-5fb1f55be5a8", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-913f-7303-9b43-5fb1f55be5a8\",\"window_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-9137-77f1-a950-c145a1c7ccb2\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"parent_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"root_turn_id\":\"01a1e2f9-90f2-7750-9905-d769942f2dc4\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809368897,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "thread_id": "01a1e2f9-9134-7462-b8e9-7764549ae4c4" + } + }, + "reply": { + "id": "resp_5", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_5", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Sub done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-followup-06.json b/packages/notify/fixtures/codex-0.169.0/subagent-followup-06.json new file mode 100644 index 0000000..fc61606 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-followup-06.json @@ -0,0 +1,205 @@ +{ + "session": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "x-codex-window-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-e214-71d3-8665-074015ef0f9e\",\"window_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-7678-7291-8906-6487796e31e6\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-e214-71d3-8665-074015ef0f9e\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809389595,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_c7831368-6320-5fa6-86e2-64ca9b02f0e8", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-910c-7190-aef1-5b30ee984336", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-910c-7190-aef1-5b44ea18e600", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9114-73d1-ae63-68141873e42e", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_NOWAIT please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "spawn_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"message\":\"SUBTASK_CX: run sleep 3 then echo hi\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f9-9150-7f82-9e95-e2d39d8265f8", + "call_id": "call_1", + "output": "{\"agent_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4\",\"nickname\":\"Leibniz\"}" + }, + { + "type": "message", + "status": "completed", + "id": "msg_3", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "Spawned, ending my turn.", + "annotations": [] + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9d98-7e20-adde-ecfd50e23de4", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n{\"agent_path\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4\",\"status\":{\"completed\":\"Sub done.\"}}\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-e22b-71a3-a812-62ecc1374edd", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_TURN next" + } + ] + } + ], + "client_metadata": { + "x-codex-window-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0", + "turn_id": "01a1e2f9-e214-71d3-8665-074015ef0f9e", + "thread_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "session_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "root_turn_id": "01a1e2f9-e214-71d3-8665-074015ef0f9e", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-e214-71d3-8665-074015ef0f9e\",\"window_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-7678-7291-8906-6487796e31e6\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-e214-71d3-8665-074015ef0f9e\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809389595,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + } + }, + "reply": { + "id": "resp_6", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_6", + "call_id": "call_6", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo hi\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-followup-07.json b/packages/notify/fixtures/codex-0.169.0/subagent-followup-07.json new file mode 100644 index 0000000..114abc7 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-followup-07.json @@ -0,0 +1,100 @@ +{ + "session": "01a1e2f9-e23e-7b42-880f-0ef6bdbc6577", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f9-e23e-7b42-880f-0ef6bdbc6577", + "x-codex-window-id": "01a1e2f9-e23e-7b42-880f-0ef6bdbc6577:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-e23e-7b42-880f-0ef6bdbc6577\",\"thread_id\":\"01a1e2f9-e23e-7b42-880f-0ef6bdbc6577\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-e255-74b0-8542-59cac898e6c6\",\"window_id\":\"01a1e2f9-e23e-7b42-880f-0ef6bdbc6577:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-e240-78d1-8ae3-4ca3a7f9394d\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-e255-74b0-8542-59cac898e6c6\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809389655,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [], + "input": [ + { + "type": "message", + "id": "msg_db5105b4-2779-582c-9a7b-2a24b7128a18", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-e25c-7dd3-9458-6dea150417c8", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-onl\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-e25c-7dd3-9458-6df0968375f1", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n 2026-11-16\n Etc/UTC\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-e25c-7dd3-9458-6e1343c32ee2", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Generate a concise, single-line task title of at most 36 characters and under five words where possible. Start with an imperative verb. Capitalize only the first word unless the user's language, proper nouns, acronyms, or code terms require otherwise. Preserve ticket references exactly. Write in the user's language. Do not use quotes, markdown, or trailing punctuation. Do not answer the request.\n\nUser prompt:\nCX_TURN next" + } + ] + } + ], + "client_metadata": { + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-e23e-7b42-880f-0ef6bdbc6577\",\"thread_id\":\"01a1e2f9-e23e-7b42-880f-0ef6bdbc6577\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-e255-74b0-8542-59cac898e6c6\",\"window_id\":\"01a1e2f9-e23e-7b42-880f-0ef6bdbc6577:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-e240-78d1-8ae3-4ca3a7f9394d\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-e255-74b0-8542-59cac898e6c6\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809389655,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "thread_id": "01a1e2f9-e23e-7b42-880f-0ef6bdbc6577", + "x-codex-window-id": "01a1e2f9-e23e-7b42-880f-0ef6bdbc6577:0", + "turn_id": "01a1e2f9-e255-74b0-8542-59cac898e6c6", + "root_turn_id": "01a1e2f9-e255-74b0-8542-59cac898e6c6", + "session_id": "01a1e2f9-e23e-7b42-880f-0ef6bdbc6577" + } + }, + "reply": { + "id": "resp_7", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_7", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Side answer", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-followup-08.json b/packages/notify/fixtures/codex-0.169.0/subagent-followup-08.json new file mode 100644 index 0000000..797c967 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-followup-08.json @@ -0,0 +1,224 @@ +{ + "session": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "x-codex-window-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-e214-71d3-8665-074015ef0f9e\",\"window_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-7678-7291-8906-6487796e31e6\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-e214-71d3-8665-074015ef0f9e\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809389595,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_c7831368-6320-5fa6-86e2-64ca9b02f0e8", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-910c-7190-aef1-5b30ee984336", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-910c-7190-aef1-5b44ea18e600", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9114-73d1-ae63-68141873e42e", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_NOWAIT please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "spawn_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"message\":\"SUBTASK_CX: run sleep 3 then echo hi\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f9-9150-7f82-9e95-e2d39d8265f8", + "call_id": "call_1", + "output": "{\"agent_id\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4\",\"nickname\":\"Leibniz\"}" + }, + { + "type": "message", + "status": "completed", + "id": "msg_3", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "Spawned, ending my turn.", + "annotations": [] + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-9d98-7e20-adde-ecfd50e23de4", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n{\"agent_path\":\"01a1e2f9-9134-7462-b8e9-7764549ae4c4\",\"status\":{\"completed\":\"Sub done.\"}}\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f9-e22b-71a3-a812-62ecc1374edd", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_TURN next" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_6", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo hi\"}", + "call_id": "call_6" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f9-e271-7801-bf84-6dac220ceab9", + "call_id": "call_6", + "output": "Chunk ID: 09a2aa\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 1\nOutput:\nhi\n" + } + ], + "client_metadata": { + "thread_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "x-codex-window-id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0", + "root_turn_id": "01a1e2f9-e214-71d3-8665-074015ef0f9e", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"thread_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f9-e214-71d3-8665-074015ef0f9e\",\"window_id\":\"01a1e2f9-7675-7cf3-9aa5-5c6820d63e59:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f9-7678-7291-8906-6487796e31e6\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f9-e214-71d3-8665-074015ef0f9e\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809389595,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2f9-7675-7cf3-9aa5-5c6820d63e59", + "turn_id": "01a1e2f9-e214-71d3-8665-074015ef0f9e" + } + }, + "reply": { + "id": "resp_8", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_8", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Turn done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-nowait-01.json b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-01.json new file mode 100644 index 0000000..067d8ce --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-01.json @@ -0,0 +1,156 @@ +{ + "session": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "x-codex-window-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"thread_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"window_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-b409-7d90-a8b0-aa4af9839d4c\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809317079,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_b20603c2-e46c-5528-8262-a4ede5401263", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c6f7-78e2-8370-3683e5a07ce8", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c6f7-78e2-8370-36984bc0f395", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c701-7550-9cee-76e0f0c69d01", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_NOWAIT please" + } + ] + } + ], + "client_metadata": { + "turn_id": "01a1e2f8-c6cf-7ba2-ad71-057d179b08c5", + "root_turn_id": "01a1e2f8-c6cf-7ba2-ad71-057d179b08c5", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"thread_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"window_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-b409-7d90-a8b0-aa4af9839d4c\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809317079,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "x-codex-window-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96:0", + "session_id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "thread_id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96" + } + }, + "reply": { + "id": "resp_1", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_1", + "call_id": "call_1", + "name": "spawn_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"message\":\"SUBTASK_CX: run sleep 3 then echo hi\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-nowait-02.json b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-02.json new file mode 100644 index 0000000..2939312 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-02.json @@ -0,0 +1,100 @@ +{ + "session": "01a1e2f8-c71e-7821-b3d2-2102072cccd2", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f8-c71e-7821-b3d2-2102072cccd2", + "x-codex-window-id": "01a1e2f8-c71e-7821-b3d2-2102072cccd2:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-c71e-7821-b3d2-2102072cccd2\",\"thread_id\":\"01a1e2f8-c71e-7821-b3d2-2102072cccd2\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c743-7aa1-a7b1-ce616a40454c\",\"window_id\":\"01a1e2f8-c71e-7821-b3d2-2102072cccd2:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-c720-79d2-b308-5218c0c47a44\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-c743-7aa1-a7b1-ce616a40454c\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809317189,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [], + "input": [ + { + "type": "message", + "id": "msg_7cf81e62-9276-51c0-ac9f-220bba75860d", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c747-7f32-9720-d819683e3bab", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-onl\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c747-7f32-9720-d824708dbd9d", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n 2026-11-16\n Etc/UTC\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c748-7631-b7bd-ac7dd2677199", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Generate a concise, single-line task title of at most 36 characters and under five words where possible. Start with an imperative verb. Capitalize only the first word unless the user's language, proper nouns, acronyms, or code terms require otherwise. Preserve ticket references exactly. Write in the user's language. Do not use quotes, markdown, or trailing punctuation. Do not answer the request.\n\nUser prompt:\nCX_NOWAIT please" + } + ] + } + ], + "client_metadata": { + "root_turn_id": "01a1e2f8-c743-7aa1-a7b1-ce616a40454c", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-c71e-7821-b3d2-2102072cccd2\",\"thread_id\":\"01a1e2f8-c71e-7821-b3d2-2102072cccd2\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c743-7aa1-a7b1-ce616a40454c\",\"window_id\":\"01a1e2f8-c71e-7821-b3d2-2102072cccd2:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-c720-79d2-b308-5218c0c47a44\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-c743-7aa1-a7b1-ce616a40454c\",\"thread_source\":\"thread_title\",\"sandbox\":\"seccomp\",\"sandbox_mode\":\"read-only\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":1794809317189,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2f8-c71e-7821-b3d2-2102072cccd2", + "turn_id": "01a1e2f8-c743-7aa1-a7b1-ce616a40454c", + "thread_id": "01a1e2f8-c71e-7821-b3d2-2102072cccd2", + "x-codex-window-id": "01a1e2f8-c71e-7821-b3d2-2102072cccd2:0" + } + }, + "reply": { + "id": "resp_2", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_2", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Side answer", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-nowait-03.json b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-03.json new file mode 100644 index 0000000..f63dd7b --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-03.json @@ -0,0 +1,175 @@ +{ + "session": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "x-codex-window-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"thread_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"window_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-b409-7d90-a8b0-aa4af9839d4c\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809317079,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_b20603c2-e46c-5528-8262-a4ede5401263", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c6f7-78e2-8370-3683e5a07ce8", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + }, + { + "type": "input_text", + "text": "# Collaboration Mode: Default\n\nYou are now in Default mode. Any previous instructions for other mode\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c6f7-78e2-8370-36984bc0f395", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c701-7550-9cee-76e0f0c69d01", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_NOWAIT please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "spawn_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"message\":\"SUBTASK_CX: run sleep 3 then echo hi\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-c73f-7c52-9fe0-f42a37ba7e75", + "call_id": "call_1", + "output": "{\"agent_id\":\"01a1e2f8-c722-70d2-aab9-1ec510d9848d\",\"nickname\":\"Copernicus\"}" + } + ], + "client_metadata": { + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"thread_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"window_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-b409-7d90-a8b0-aa4af9839d4c\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"thread_source\":\"user\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809317079,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "x-codex-window-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96:0", + "session_id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "thread_id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "turn_id": "01a1e2f8-c6cf-7ba2-ad71-057d179b08c5", + "root_turn_id": "01a1e2f8-c6cf-7ba2-ad71-057d179b08c5" + } + }, + "reply": { + "id": "resp_3", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_3", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Spawned, ending my turn.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-nowait-04.json b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-04.json new file mode 100644 index 0000000..f2a4fb1 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-04.json @@ -0,0 +1,152 @@ +{ + "session": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f8-c722-70d2-aab9-1ec510d9848d", + "x-openai-subagent": "collab_spawn", + "x-codex-parent-thread-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "x-codex-window-id": "01a1e2f8-c722-70d2-aab9-1ec510d9848d:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"thread_id\":\"01a1e2f8-c722-70d2-aab9-1ec510d9848d\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c72d-7ae1-bcfc-aadcd8d26aa4\",\"window_id\":\"01a1e2f8-c722-70d2-aab9-1ec510d9848d:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-c725-7471-b707-777fc3add04a\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"parent_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"root_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809317168,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_e50a4118-0c69-5a9a-b0f2-7f06b2a817b0", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c747-7f32-9720-d837cb3161ba", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c747-7f32-9720-d84bd6e97a6b", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c76d-7251-bede-da1b733c330b", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "SUBTASK_CX: run sleep 3 then echo hi" + } + ] + } + ], + "client_metadata": { + "x-codex-parent-thread-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"thread_id\":\"01a1e2f8-c722-70d2-aab9-1ec510d9848d\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c72d-7ae1-bcfc-aadcd8d26aa4\",\"window_id\":\"01a1e2f8-c722-70d2-aab9-1ec510d9848d:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-c725-7471-b707-777fc3add04a\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"parent_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"root_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809317168,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "turn_id": "01a1e2f8-c72d-7ae1-bcfc-aadcd8d26aa4", + "parent_turn_id": "01a1e2f8-c6cf-7ba2-ad71-057d179b08c5", + "x-openai-subagent": "collab_spawn", + "root_turn_id": "01a1e2f8-c6cf-7ba2-ad71-057d179b08c5", + "thread_id": "01a1e2f8-c722-70d2-aab9-1ec510d9848d", + "session_id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "x-codex-window-id": "01a1e2f8-c722-70d2-aab9-1ec510d9848d:0" + } + }, + "reply": { + "id": "resp_4", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_4", + "call_id": "call_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 3; echo hi\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-nowait-05.json b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-05.json new file mode 100644 index 0000000..37e4b22 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-nowait-05.json @@ -0,0 +1,171 @@ +{ + "session": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "headers": { + "originator": "codex-tui", + "x-client-request-id": "01a1e2f8-c722-70d2-aab9-1ec510d9848d", + "x-openai-subagent": "collab_spawn", + "x-codex-parent-thread-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "x-codex-window-id": "01a1e2f8-c722-70d2-aab9-1ec510d9848d:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"thread_id\":\"01a1e2f8-c722-70d2-aab9-1ec510d9848d\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c72d-7ae1-bcfc-aadcd8d26aa4\",\"window_id\":\"01a1e2f8-c722-70d2-aab9-1ec510d9848d:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-c725-7471-b707-777fc3add04a\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"parent_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"root_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809317168,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "list_mcp_resources" + }, + { + "type": "function", + "name": "list_mcp_resource_templates" + }, + { + "type": "function", + "name": "read_mcp_resource" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "mcp__codex_tui" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_e50a4118-0c69-5a9a-b0f2-7f06b2a817b0", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c747-7f32-9720-d837cb3161ba", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c747-7f32-9720-d84bd6e97a6b", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-c76d-7251-bede-da1b733c330b", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "SUBTASK_CX: run sleep 3 then echo hi" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_4", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 3; echo hi\"}", + "call_id": "call_4" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-d35a-72a3-b19f-7ef259963bd0", + "call_id": "call_4", + "output": "Chunk ID: c8f2f2\nWall time: 2.8549 seconds\nProcess exited with code 0\nOriginal token count: 1\nOutput:\nhi\n" + } + ], + "client_metadata": { + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"thread_id\":\"01a1e2f8-c722-70d2-aab9-1ec510d9848d\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-c72d-7ae1-bcfc-aadcd8d26aa4\",\"window_id\":\"01a1e2f8-c722-70d2-aab9-1ec510d9848d:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-c725-7471-b707-777fc3add04a\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f8-b407-7752-bbbf-7ff4711ecd96\",\"parent_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"root_turn_id\":\"01a1e2f8-c6cf-7ba2-ad71-057d179b08c5\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"user\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809317168,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "x-codex-parent-thread-id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "thread_id": "01a1e2f8-c722-70d2-aab9-1ec510d9848d", + "session_id": "01a1e2f8-b407-7752-bbbf-7ff4711ecd96", + "x-codex-window-id": "01a1e2f8-c722-70d2-aab9-1ec510d9848d:0", + "x-openai-subagent": "collab_spawn", + "parent_turn_id": "01a1e2f8-c6cf-7ba2-ad71-057d179b08c5", + "root_turn_id": "01a1e2f8-c6cf-7ba2-ad71-057d179b08c5", + "turn_id": "01a1e2f8-c72d-7ae1-bcfc-aadcd8d26aa4" + } + }, + "reply": { + "id": "resp_5", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_5", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Sub done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-wait-01.json b/packages/notify/fixtures/codex-0.169.0/subagent-wait-01.json new file mode 100644 index 0000000..d207e03 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-wait-01.json @@ -0,0 +1,136 @@ +{ + "session": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "x-codex-window-id": "01a1e2f8-2603-73b3-a31c-d86713e85209:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"window_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-2605-7630-b1d9-30b9807b24a4\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809275935,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_25dfe526-ff1d-511a-98ee-774af58862ab", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-2638-74c1-96b3-18cf6da9e2c4", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-2638-74c1-96b3-18dafdbcf1f5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-2648-7411-a6dd-8e0061513cae", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SPAWN please" + } + ] + } + ], + "client_metadata": { + "root_turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"window_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-2605-7630-b1d9-30b9807b24a4\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809275935,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757", + "session_id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "thread_id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "x-codex-window-id": "01a1e2f8-2603-73b3-a31c-d86713e85209:0" + } + }, + "reply": { + "id": "resp_1", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_1", + "call_id": "call_1", + "name": "spawn_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"message\":\"SUBTASK_CX: run sleep 3 then echo hi\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-wait-02.json b/packages/notify/fixtures/codex-0.169.0/subagent-wait-02.json new file mode 100644 index 0000000..50131a2 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-wait-02.json @@ -0,0 +1,151 @@ +{ + "session": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "x-codex-window-id": "01a1e2f8-2603-73b3-a31c-d86713e85209:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"window_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-2605-7630-b1d9-30b9807b24a4\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809275935,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_25dfe526-ff1d-511a-98ee-774af58862ab", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-2638-74c1-96b3-18cf6da9e2c4", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-2638-74c1-96b3-18dafdbcf1f5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-2648-7411-a6dd-8e0061513cae", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SPAWN please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "spawn_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"message\":\"SUBTASK_CX: run sleep 3 then echo hi\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-269b-7913-912a-f59d7d2c6c70", + "call_id": "call_1", + "output": "{\"agent_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af\",\"nickname\":\"Aquinas\"}" + } + ], + "client_metadata": { + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"window_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-2605-7630-b1d9-30b9807b24a4\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809275935,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757", + "root_turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757", + "session_id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "thread_id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "x-codex-window-id": "01a1e2f8-2603-73b3-a31c-d86713e85209:0" + } + }, + "reply": { + "id": "resp_2", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_2", + "call_id": "call_2", + "name": "wait_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"targets\":[\"01a1e2f8-2669-7b80-98da-19673ff1c9af\"],\"timeout_ms\":30000}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-wait-03.json b/packages/notify/fixtures/codex-0.169.0/subagent-wait-03.json new file mode 100644 index 0000000..5c1b9d2 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-wait-03.json @@ -0,0 +1,136 @@ +{ + "session": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-2669-7b80-98da-19673ff1c9af", + "x-openai-subagent": "collab_spawn", + "x-codex-parent-thread-id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "x-codex-window-id": "01a1e2f8-2669-7b80-98da-19673ff1c9af:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-2674-7642-91bc-0ea6ae32afcf\",\"window_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-266c-7fd1-a2ad-e77dccc2cb90\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"parent_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809276022,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_f561dc0d-1544-5563-9d81-0c588b199fde", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-269f-7382-b560-02c512a7c411", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-269f-7382-b560-02d8a3286429", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-26ab-7d42-b4da-4bb20ec08ea2", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "SUBTASK_CX: run sleep 3 then echo hi" + } + ] + } + ], + "client_metadata": { + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-2674-7642-91bc-0ea6ae32afcf\",\"window_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-266c-7fd1-a2ad-e77dccc2cb90\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"parent_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809276022,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "x-openai-subagent": "collab_spawn", + "x-codex-parent-thread-id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "parent_turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757", + "session_id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "x-codex-window-id": "01a1e2f8-2669-7b80-98da-19673ff1c9af:0", + "thread_id": "01a1e2f8-2669-7b80-98da-19673ff1c9af", + "turn_id": "01a1e2f8-2674-7642-91bc-0ea6ae32afcf", + "root_turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757" + } + }, + "reply": { + "id": "resp_3", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_3", + "call_id": "call_3", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 3; echo hi\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-wait-04.json b/packages/notify/fixtures/codex-0.169.0/subagent-wait-04.json new file mode 100644 index 0000000..ccf1763 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-wait-04.json @@ -0,0 +1,155 @@ +{ + "session": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-2669-7b80-98da-19673ff1c9af", + "x-openai-subagent": "collab_spawn", + "x-codex-parent-thread-id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "x-codex-window-id": "01a1e2f8-2669-7b80-98da-19673ff1c9af:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-2674-7642-91bc-0ea6ae32afcf\",\"window_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-266c-7fd1-a2ad-e77dccc2cb90\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"parent_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809276022,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_f561dc0d-1544-5563-9d81-0c588b199fde", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-269f-7382-b560-02c512a7c411", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-269f-7382-b560-02d8a3286429", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-26ab-7d42-b4da-4bb20ec08ea2", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "SUBTASK_CX: run sleep 3 then echo hi" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_3", + "name": "exec_command", + "arguments": "{\"cmd\":\"sleep 3; echo hi\"}", + "call_id": "call_3" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-3298-7d92-9a2f-dd889c61a0e6", + "call_id": "call_3", + "output": "Chunk ID: de5339\nWall time: 2.8550 seconds\nProcess exited with code 0\nOriginal token count: 1\nOutput:\nhi\n" + } + ], + "client_metadata": { + "thread_id": "01a1e2f8-2669-7b80-98da-19673ff1c9af", + "x-openai-subagent": "collab_spawn", + "x-codex-window-id": "01a1e2f8-2669-7b80-98da-19673ff1c9af:0", + "parent_turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757", + "root_turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-2674-7642-91bc-0ea6ae32afcf\",\"window_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-266c-7fd1-a2ad-e77dccc2cb90\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"parent_thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"parent_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"subagent_kind\":\"thread_spawn\",\"thread_source\":\"subagent\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809276022,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "x-codex-parent-thread-id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "turn_id": "01a1e2f8-2674-7642-91bc-0ea6ae32afcf", + "session_id": "01a1e2f8-2603-73b3-a31c-d86713e85209" + } + }, + "reply": { + "id": "resp_4", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_4", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Sub done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/subagent-wait-05.json b/packages/notify/fixtures/codex-0.169.0/subagent-wait-05.json new file mode 100644 index 0000000..f58d9ed --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/subagent-wait-05.json @@ -0,0 +1,181 @@ +{ + "session": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "x-codex-window-id": "01a1e2f8-2603-73b3-a31c-d86713e85209:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"window_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-2605-7630-b1d9-30b9807b24a4\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809275935,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_25dfe526-ff1d-511a-98ee-774af58862ab", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-2638-74c1-96b3-18cf6da9e2c4", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-2638-74c1-96b3-18dafdbcf1f5", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f8-2648-7411-a6dd-8e0061513cae", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_SPAWN please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "spawn_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"message\":\"SUBTASK_CX: run sleep 3 then echo hi\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-269b-7913-912a-f59d7d2c6c70", + "call_id": "call_1", + "output": "{\"agent_id\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af\",\"nickname\":\"Aquinas\"}" + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_2", + "name": "wait_agent", + "namespace": "multi_agent_v1", + "arguments": "{\"targets\":[\"01a1e2f8-2669-7b80-98da-19673ff1c9af\"],\"timeout_ms\":30000}", + "call_id": "call_2" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f8-32b1-7322-bee1-194490df11ed", + "call_id": "call_2", + "output": "{\"status\":{\"01a1e2f8-2669-7b80-98da-19673ff1c9af\":{\"completed\":\"Sub done.\"}},\"timed_out\":false}" + }, + { + "type": "message", + "id": "msg_01a1e2f8-32b3-7532-bddf-5e6bfa0dedff", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n{\"agent_path\":\"01a1e2f8-2669-7b80-98da-19673ff1c9af\",\"status\":{\"completed\":\"Sub done.\"}}\n" + } + ] + } + ], + "client_metadata": { + "thread_id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "root_turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"thread_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"window_id\":\"01a1e2f8-2603-73b3-a31c-d86713e85209:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f8-2605-7630-b1d9-30b9807b24a4\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f8-261c-7ce2-b61a-23d3f2286757\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809275935,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "session_id": "01a1e2f8-2603-73b3-a31c-d86713e85209", + "x-codex-window-id": "01a1e2f8-2603-73b3-a31c-d86713e85209:0", + "turn_id": "01a1e2f8-261c-7ce2-b61a-23d3f2286757" + } + }, + "reply": { + "id": "resp_5", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_5", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Noted the subagent.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/turn-01.json b/packages/notify/fixtures/codex-0.169.0/turn-01.json new file mode 100644 index 0000000..92e4fc5 --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/turn-01.json @@ -0,0 +1,135 @@ +{ + "session": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a", + "x-codex-window-id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a\",\"thread_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f7-ea01-7d01-83dc-d67834eb6172\",\"window_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f7-e9e0-7943-861b-b253a240d144\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f7-ea01-7d01-83dc-d67834eb6172\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809260552,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_e7295f47-a272-5768-8d3d-e7efd35355b7", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f7-ea28-7d12-a682-3ea7aed06078", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f7-ea28-7d12-a682-3eb0e630f22d", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f7-ea30-7f71-8c06-cafe885a5e14", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_TURN please" + } + ] + } + ], + "client_metadata": { + "session_id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a", + "x-codex-window-id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a:0", + "root_turn_id": "01a1e2f7-ea01-7d01-83dc-d67834eb6172", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a\",\"thread_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f7-ea01-7d01-83dc-d67834eb6172\",\"window_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f7-e9e0-7943-861b-b253a240d144\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f7-ea01-7d01-83dc-d67834eb6172\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809260552,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "turn_id": "01a1e2f7-ea01-7d01-83dc-d67834eb6172", + "thread_id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a" + } + }, + "reply": { + "id": "resp_1", + "object": "response", + "status": "completed", + "output": [ + { + "type": "function_call", + "id": "fc_1", + "call_id": "call_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo hi\"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/fixtures/codex-0.169.0/turn-02.json b/packages/notify/fixtures/codex-0.169.0/turn-02.json new file mode 100644 index 0000000..470e73d --- /dev/null +++ b/packages/notify/fixtures/codex-0.169.0/turn-02.json @@ -0,0 +1,154 @@ +{ + "session": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a", + "headers": { + "originator": "codex_exec", + "x-client-request-id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a", + "x-codex-window-id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a:0", + "x-codex-beta-features": "remote_compaction_v2", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a\",\"thread_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f7-ea01-7d01-83dc-d67834eb6172\",\"window_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f7-e9e0-7943-861b-b253a240d144\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f7-ea01-7d01-83dc-d67834eb6172\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809260552,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}" + }, + "body": { + "model": "gpt-5.1-codex", + "stream": true, + "tools": [ + { + "type": "function", + "name": "exec_command" + }, + { + "type": "function", + "name": "write_stdin" + }, + { + "type": "function", + "name": "request_user_input" + }, + { + "type": "function", + "name": "view_image" + }, + { + "type": "namespace", + "name": "multi_agent_v1" + }, + { + "type": "function", + "name": "get_goal" + }, + { + "type": "function", + "name": "create_goal" + }, + { + "type": "function", + "name": "update_goal" + }, + { + "type": "web_search" + } + ], + "input": [ + { + "type": "message", + "id": "msg_e7295f47-a272-5768-8d3d-e7efd35355b7", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project \n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f7-ea28-7d12-a682-3ea7aed06078", + "role": "developer", + "content": [ + { + "type": "input_text", + "text": "\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Be\n…(cut)" + }, + { + "type": "input_text", + "text": "\nFilesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-f\n…(cut)" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f7-ea28-7d12-a682-3eb0e630f22d", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "\n /tmp/sbx/cxproj\n bash\n 2026-11-16\n Etc/UTC\n /tmp/sbx/cxproj\n" + } + ] + }, + { + "type": "message", + "id": "msg_01a1e2f7-ea30-7f71-8c06-cafe885a5e14", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "CX_TURN please" + } + ] + }, + { + "type": "function_call", + "status": "completed", + "id": "fc_1", + "name": "exec_command", + "arguments": "{\"cmd\":\"echo hi\"}", + "call_id": "call_1" + }, + { + "type": "function_call_output", + "id": "fco_01a1e2f7-ea80-7ba2-9be7-8c39ef625414", + "call_id": "call_1", + "output": "Chunk ID: db9737\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 1\nOutput:\nhi\n" + } + ], + "client_metadata": { + "thread_id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a", + "turn_id": "01a1e2f7-ea01-7d01-83dc-d67834eb6172", + "root_turn_id": "01a1e2f7-ea01-7d01-83dc-d67834eb6172", + "session_id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a", + "x-codex-turn-metadata": "{\"installation_id\":\"(blanked)\",\"session_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a\",\"thread_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a\",\"agent_name\":\"/root\",\"turn_id\":\"01a1e2f7-ea01-7d01-83dc-d67834eb6172\",\"window_id\":\"01a1e2f7-e9dc-7651-8da1-60a531a65c7a:0\",\"window_number\":0,\"context_window_id\":\"01a1e2f7-e9e0-7943-861b-b253a240d144\",\"request_kind\":\"turn\",\"history_initialization\":\"new\",\"root_turn_id\":\"01a1e2f7-ea01-7d01-83dc-d67834eb6172\",\"thread_source\":\"user\",\"turn_trigger\":\"exec\",\"sandbox\":\"none\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"workspaces\":{\"/tmp/sbx/cxproj\":{\"has_changes\":false}},\"turn_started_at_unix_ms\":1794809260552,\"analytics_enabled\":true,\"model\":\"gpt-5.1-codex\"}", + "x-codex-window-id": "01a1e2f7-e9dc-7651-8da1-60a531a65c7a:0" + } + }, + "reply": { + "id": "resp_2", + "object": "response", + "status": "completed", + "output": [ + { + "type": "message", + "id": "msg_2", + "role": "assistant", + "status": "completed", + "content": [ + { + "type": "output_text", + "text": "Turn done.", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1000, + "output_tokens": 50, + "total_tokens": 1050, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } +} \ No newline at end of file diff --git a/packages/notify/notify.hooks.mjs b/packages/notify/notify.hooks.mjs index 8e79f3b..df7dba0 100644 --- a/packages/notify/notify.hooks.mjs +++ b/packages/notify/notify.hooks.mjs @@ -11,7 +11,7 @@ // message to the channels and returns at once. Nothing here throws, and // nothing is awaited on the request's path: a broken channel must never // touch the request. -import { hasTools, opensTurn, ending, firstWords, compacting, continued, background, subagent } from "./turn.mjs" +import { hasTools, opensTurn, ending, firstWords, compacting, continued, background, subagent, progressSummary } from "./turn.mjs" import { send, usable } from "./channels.mjs" // open conversations: key -> { key, base, start, seen, agent, model, cwd, busy, waiting, nested, failed, background, compactedAt } @@ -167,6 +167,11 @@ export function onRequest(body, ctx) { if (c) { c.compactedAt = t; c.seen = t } return undefined } + // a subagent's progress label (Claude Code 2.1.318+): its end_turn reply + // would end the subagent's turn, and the subagent's next request would + // then be taken for a conversation of its own once the parent has been + // quiet a while, pushing in the middle of the work + if (progressSummary(body, ctx?.protocol)) return undefined if (!hasTools(body, ctx.protocol)) return undefined let turn = turns.get(key) const resumed = !turn && continued(body, ctx.protocol) diff --git a/packages/notify/notify.test.mjs b/packages/notify/notify.test.mjs index 7ec8c51..42b9327 100644 --- a/packages/notify/notify.test.mjs +++ b/packages/notify/notify.test.mjs @@ -5,7 +5,7 @@ import { afterEach, beforeEach, expect, test } from "bun:test" import { createHmac } from "node:crypto" import { readFileSync, readdirSync } from "node:fs" import { onRequest, onResponse, onSignIn, signInMessage, reset, settled, options, duration, message } from "./notify.hooks.mjs" -import { opensTurn, ending, hasTools, firstWords, compacting, continued, notificationOnly, background, subagent } from "./turn.mjs" +import { opensTurn, ending, hasTools, firstWords, compacting, continued, notificationOnly, background, subagent, progressSummary } from "./turn.mjs" import { send, usable } from "./channels.mjs" const realFetch = globalThis.fetch @@ -640,6 +640,202 @@ test("a Responses request with no user message stays in the conversation it cont expect(JSON.parse(calls[0].body).title).toBe("✅ Codex done · magpie-plugins") }) +// ---- re-recorded against newer clients: claude 2.1.325 and codex 0.169.0 ---- +// The same rigs (fake endpoints that log every request and answer by script), +// `claude -p` or its TUI in a pty, `codex exec` or its TUI; trimmed the same way. +const fxIn = (dir, name) => JSON.parse(readFileSync(new URL(`./fixtures/${dir}/${name}.json`, import.meta.url), "utf8")) +const recordedIn = (dir, prefix) => readdirSync(new URL(`./fixtures/${dir}/`, import.meta.url)).filter((f) => f.startsWith(prefix + "-")).sort().map((f) => f.slice(0, -5)) +async function replayIn(dir, protocol, prefix, gap) { + const after = [] + for (const name of recordedIn(dir, prefix)) { + const f = fxIn(dir, name) + minutes(gap) + await exchange(protocol, f.body, f.reply, { session: f.session, ...(protocol === "responses" ? { agent: "codex" } : {}) }) + after.push(calls.length) + } + return after +} +const CC = "claude-2.1.325", CX = "codex-0.169.0" +const cc = (name) => fxIn(CC, name), cx9 = (name) => fxIn(CX, name) +// one request whose reply comes `took` minutes later +async function slow(dir, protocol, name, took) { + const f = fxIn(dir, name), c = ctx(protocol, { session: f.session }) + onRequest(f.body, c) + minutes(took) + onResponse(f.reply, c) + await settled() +} +const lastText = (body) => { const c = body.messages.at(-1).content; return typeof c === "string" ? c : c.map((p) => p.text ?? "").join("\n") } + +test("captured 2.1.325: a background agent's progress-summary requests (2.1.318+) stay inside the agent and never end the turn", async () => { + // 04 and 06 are the summary requests: the agent's own transcript forked, + // tools and all, with the "Describe your most recent action" prompt as the + // newest user text, answered with plain text and end_turn + for (const n of ["agent-progress-04", "agent-progress-06"]) { + expect(lastText(cc(n).body)).toContain("Describe your most recent action in 3-5 words") + expect(ending(cc(n).reply, "anthropic").done).toBe(true) + } + expect(opensTurn(cc("agent-progress-04").body, "anthropic")).toBe(true) // the prompt alone + expect(opensTurn(cc("agent-progress-06").body, "anthropic")).toBe(false) // the prompt beside the last tool_result + // the first one folds the prompt into the agent's first user message, so it + // reads as a conversation of its own; the later one is the agent's conversation + expect(firstWords(cc("agent-progress-04").body, "anthropic")).not.toBe(firstWords(cc("agent-progress-02").body, "anthropic")) + expect(firstWords(cc("agent-progress-06").body, "anthropic")).toBe(firstWords(cc("agent-progress-02").body, "anthropic")) + expect(background(cc("agent-progress-03").body, "anthropic").launched).toEqual(["toolu_ag_bg"]) + expect(await replayIn(CC, "anthropic", "agent-progress", 2)).toEqual([0, 0, 0, 0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 14 min") +}) + +// the captured requests, in an order a longer agent run sends them, with +// `gap` minutes before each; returns how many pushes there were after each +async function steps(list) { + const after = [] + for (const [gap, f] of list) { + minutes(gap) + const x = typeof f === "string" ? cc(f) : f + await exchange("anthropic", x.body, x.reply, { session: x.session }) + after.push(calls.length) + } + return after +} + +test("a progress-summary request is a side call: it neither opens nor closes a turn, and leaves the agent's turn alone", async () => { + expect(progressSummary(cc("agent-progress-04").body, "anthropic")).toBe(true) // folded into the first message + expect(progressSummary(cc("agent-progress-06").body, "anthropic")).toBe(true) // beside the last tool_result + for (const n of ["agent-progress-01", "agent-progress-02", "agent-progress-05", "agent-progress-08", "compact-twice-02", "autocompact-03"]) + expect(progressSummary(cc(n).body, "anthropic")).toBe(false) + // the words quoted by the user are no summary request + expect(progressSummary({ messages: [{ role: "user", content: "why does it say Describe your most recent action in 3-5 words?" }] }, "anthropic")).toBe(false) + expect(progressSummary(cc("agent-progress-04").body, "responses")).toBe(false) + const P = (i) => `agent-progress-0${i}` + // a foreground Agent: the main conversation waits on the call, quiet, while + // the agent works through three tool rounds with summaries between them + // (05 and 06 sent again for the third round, as a longer run would). Before + // the summaries were set aside, the one at 06 ended the agent's turn, the + // agent's next request came after the parent had been quiet 15 min and was + // taken for a conversation of its own, and the next summary pushed + // "done · took 20 min" from the middle of the agent's work. + const main = cc(P(1)) + const back = { session: main.session, body: { ...main.body, messages: [...main.body.messages, { role: "assistant", content: main.reply.content }, { role: "user", content: [{ type: "tool_result", tool_use_id: "toolu_ag_bg", content: "Slept twice, done." }] }] }, reply: { type: "message", role: "assistant", stop_reason: "end_turn", content: [{ type: "text", text: "The agent finished." }] } } + expect(await steps([[0, P(1)], [0, P(2)], [0.5, P(4)], [0.5, P(5)], [0.5, P(6)], [16, P(5)], [20, P(6)], [20, P(7)], [0, back]])).toEqual([0, 0, 0, 0, 0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 58 min") + // a background Agent that outlasts the two hours its parent is held quiet + reset(() => clock, fakeTimers); calls = [] + expect(await steps([[0, P(1)], [0, P(2)], [0, P(3)], [0.5, P(4)], [0.5, P(5)], [0.5, P(6)], [125, P(5)], [20, P(6)], [20, P(7)], [0, P(8)]])).toEqual([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 2 h 47 min") +}) + +test("captured 2.1.325: an agent that stops with background work of its own is interim until it notifies again", async () => { + expect(background(cc("agent-interim-05").body, "anthropic").interim).toEqual(["toolu_ag_int"]) + expect(await replayIn(CC, "anthropic", "agent-interim", 2)).toEqual([0, 0, 0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 12 min") +}) + +test("captured 2.1.325: SendMessage to a finished agent resumes it and holds the turn; one to a running agent makes its notification interim", async () => { + expect(background(cc("sendmessage-07").body, "anthropic")).toEqual({ launched: ["toolu_send"], stopped: [], interim: [], agents: { toolu_send: "a55ae11abbf84b673" } }) + expect(await replayIn(CC, "anthropic", "sendmessage", 2)).toEqual([0, 0, 0, 0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 14 min") + reset(() => clock, fakeTimers); calls = [] + expect(background(cc("late-message-05").body, "anthropic").launched).toEqual([]) // "Message queued for delivery…" + expect(background(cc("late-message-06").body, "anthropic").interim).toEqual(["toolu_ag_race"]) + expect(background(cc("late-message-08").body, "anthropic").stopped).toEqual(["a0a227ba3bcb7965c"]) + expect(await replayIn(CC, "anthropic", "late-message", 2)).toEqual([0, 0, 0, 0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 14 min") +}) + +test("captured 2.1.325 (TUI): /compact twice in a row sends one summary request; the next message is a turn of its own", async () => { + await slow(CC, "anthropic", "compact-twice-01", 5) + expect(calls).toHaveLength(1) + expect(compacting(cc("compact-twice-02").body, "anthropic")).toBe(true) + await slow(CC, "anthropic", "compact-twice-02", 1) + expect(calls).toHaveLength(1) + // the second /compact ran locally ("Not enough messages to compact.") and + // rides as caveats in the next message, after the summary + const f = cc("compact-twice-03") + expect(continued(f.body, "anthropic")).toBe(true) + expect(JSON.stringify(f.body.messages[0].content)).toContain("Not enough messages to compact.") + minutes(1) + await slow(CC, "anthropic", "compact-twice-03", 4) + expect(calls).toHaveLength(2) + expect(JSON.parse(calls[1].body).message).toContain("took 4 min") +}) + +test("captured 2.1.325 (TUI): /compact, a message, /compact again: each message pushes, the summaries never do", async () => { + await slow(CC, "anthropic", "compact-again-01", 5) + await slow(CC, "anthropic", "compact-again-02", 1) + await slow(CC, "anthropic", "compact-again-03", 4) + expect(calls).toHaveLength(2) + const again = cc("compact-again-04").body // compacting the conversation that went on from the first summary + expect(compacting(again, "anthropic") && continued(again, "anthropic")).toBe(true) + await slow(CC, "anthropic", "compact-again-04", 1) + expect(calls).toHaveLength(2) + await slow(CC, "anthropic", "compact-again-05", 6) + expect(calls).toHaveLength(3) + expect(JSON.parse(calls[2].body).message).toContain("took 6 min") +}) + +test("captured 2.1.325: auto-compaction mid tool loop neither ends nor restarts the turn", async () => { + expect(compacting(cc("autocompact-02").body, "anthropic")).toBe(true) + expect(continued(cc("autocompact-03").body, "anthropic")).toBe(true) + expect(await replayIn(CC, "anthropic", "autocompact", 2)).toEqual([0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 8 min") +}) + +const turnMeta = (f) => JSON.parse(f.body.client_metadata["x-codex-turn-metadata"]) + +test("captured Codex 0.169.0: a plain turn, and a subagent told apart by thread id and nested by client_metadata and headers", async () => { + expect(await replayIn(CX, "responses", "turn", 3)).toEqual([0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 3 min") + reset(() => clock, fakeTimers); calls = [] + const sub = cx9("subagent-wait-03") + expect(sub.headers["x-openai-subagent"]).toBe("collab_spawn") + expect(sub.headers["x-codex-parent-thread-id"]).toBe(cx9("subagent-wait-01").body.client_metadata.thread_id) + expect(sub.body.client_metadata["x-openai-subagent"]).toBe("collab_spawn") + expect(turnMeta(sub).thread_source).toBe("subagent") + expect(subagent(sub.body, "responses")).toBe(true) + expect(firstWords(sub.body, "responses")).toBe(`codex thread ${sub.body.client_metadata.thread_id}`) + expect(opensTurn(cx9("subagent-wait-05").body, "responses")).toBe(false) // , still a user message + expect(await replayIn(CX, "responses", "subagent-wait", 3)).toEqual([0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 12 min") +}) + +test("captured Codex 0.169.0 (TUI): the parent ends its turn before its subagent; the title request is a side call; the notification rides in with your next message", async () => { + expect(hasTools(cx9("subagent-nowait-02").body, "responses")).toBe(false) // "Generate a concise, single-line task title…" + expect(turnMeta(cx9("subagent-nowait-02")).thread_source).toBe("thread_title") + expect(await replayIn(CX, "responses", "subagent-nowait", 3)).toEqual([0, 0, 1, 1, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 6 min") + reset(() => clock, fakeTimers); calls = [] + const next = cx9("subagent-followup-06").body + expect(next.input.at(-2).content[0].text.startsWith("")).toBe(true) + expect(opensTurn(next, "responses")).toBe(true) + expect(await replayIn(CX, "responses", "subagent-followup", 3)).toEqual([0, 0, 1, 1, 1, 1, 1, 2]) + expect(JSON.parse(calls[1].body).message).toContain("took 6 min") +}) + +test("captured Codex 0.169.0: auto-compaction, local (custom provider) and remote (openai provider): one push, timed from the user's message", async () => { + expect(compacting(cx9("compact-local-03").body, "responses")).toBe(true) + expect(turnMeta(cx9("compact-local-03")).request_kind).toBe("compaction") + expect(continued(cx9("compact-local-04").body, "responses")).toBe(true) + expect(await replayIn(CX, "responses", "compact-local", 3)).toEqual([0, 0, 0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 18 min") + reset(() => clock, fakeTimers); calls = [] + expect(cx9("compact-remote-03").body.input.at(-1).type).toBe("compaction_trigger") + expect(await replayIn(CX, "responses", "compact-remote", 3)).toEqual([0, 0, 0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 18 min") +}) + +test("captured Codex 0.169.0 (TUI): a queued message keeps its thread id and is a turn of its own; one steered into a running turn restarts its clock", async () => { + const thread = cx9("queued-01").body.client_metadata.thread_id + expect(cx9("queued-04").body.client_metadata.thread_id).toBe(thread) + expect(firstWords(cx9("queued-04").body, "responses")).toBe(firstWords(cx9("queued-01").body, "responses")) + expect(await replayIn(CX, "responses", "queued", 3)).toEqual([0, 0, 1, 1, 1, 2]) + expect(calls.map((c) => JSON.parse(c.body).message.split("\n")[0])).toEqual(["took 6 min", "took 6 min"]) + reset(() => clock, fakeTimers); calls = [] + expect(cx9("steer-03").body.input.at(-1).content[0].text).toBe("CX_QUEUED steer") // after the tool's output, mid-turn + expect(await replayIn(CX, "responses", "steer", 3)).toEqual([0, 0, 0, 0, 1]) + expect(JSON.parse(calls[0].body).message).toContain("took 6 min") +}) + test("includeText adds the reply, cut to maxTextLength; lang zh", async () => { const o = { includeText: true, maxTextLength: 10, lang: "zh" } await exchange("anthropic", aUser, aToolUse, { options: o }) diff --git a/packages/notify/package.json b/packages/notify/package.json index 455cf5d..bba056a 100644 --- a/packages/notify/package.json +++ b/packages/notify/package.json @@ -1,6 +1,6 @@ { "name": "@magpie-community/gateway-notify", - "version": "0.1.4", + "version": "0.1.5", "description": "A push to your phone or team chat when an agent's turn is done or an account is signed out: ntfy, Bark, Gotify, Server酱, Feishu, DingTalk, WeCom, Telegram or a webhook", "type": "module", "files": ["notify.hooks.mjs", "turn.mjs", "channels.mjs", "page/*.html", "page/*.js", "page/*.css", "README.md"], diff --git a/packages/notify/turn.mjs b/packages/notify/turn.mjs index fa29b76..70330f5 100644 --- a/packages/notify/turn.mjs +++ b/packages/notify/turn.mjs @@ -188,6 +188,28 @@ export function continued(body, protocol) { return !!first && holds(first.content, [CLAUDE_CONTINUED]) } +// Claude Code 2.1.318+ keeps a one-line progress label for each running +// subagent (anthropics/claude-code#86879; off with +// CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES): about every 30 seconds it +// forks the subagent's transcript, tools and all, and asks with PROGRESS as +// the newest user text, folded into the last user message (beside its +// tool_result, or into the first message while the first tool runs). The +// reply is plain text and end_turn, which reads like the subagent's end +// (captured from the real claude 2.1.325, fixtures/claude-2.1.325). A +// server flag can pick a writer that is sent short notes instead, with no +// tools: hasTools already leaves that one out. +const PROGRESS = "Describe your most recent action in 3-5 words" + +// progressSummary: the request asks for a subagent's progress label; it +// neither opens nor closes a turn, and leaves the subagent's own turn alone +export function progressSummary(body, protocol) { + if (protocol !== "anthropic") return false + const last = lastUser(body) + if (!isObj(last) || last.role !== "user") return false + const t = texts(last.content) + return t.length > 0 && t.at(-1).trimStart().startsWith(PROGRESS) +} + // Claude Code's background agents. The Agent tool can return at once ("Async // agent launched successfully"), and the Workflow tool always does ("Workflow // launched in background"): LAUNCHED, by the tool that answers so. SendMessage