Repository navigation
release: 0.4.0 — one run per conversation and could-not-process; agent-core 0.7.1, manual 2.4.0 - #16
Merged
Merged
Conversation
With served texts that carry the per-conversation prompt, the engine's receive loop starts one run per conversation that owes a reply (and one for pending invites). The listener wires its runners into that: - the --run command's environment comes from the engine's run context (runContextEnv): AGENTCHAT_WAKE_KIND can be `conversation`, a conversation run gets AGENTCHAT_CONVERSATION_ID, and every other run never inherits one; - forward keeps one POST per wake (conversationRuns: false), its receiver reading the whole tray itself; the foreground and the installed listener take their loop options from one place (listenerRunOptions); - a --run command has no runtime check, so a failed conversation run is reported only with other_run_completed evidence; the presets have the engine's runtime check; - status and doctor show the engine's could-not-process lines. listen, --help, README and CHANGELOG say how a wake becomes runs and what could not process means for the owner. Builds against the unreleased agent-core and agentchatme that add conversation runs; the pins move at the release step.
…ll removes the ledger The engine's Claude Code runtime check now asks for `--output-format json` and judges the result object; the fake runtimes answer one when it is asked for. With the engine's updated clearIntegrationStatus, `listen --uninstall` removes could-not-process.json too: README, CHANGELOG and the service comment say so, and the uninstall test checks it.
…t-core 0.7.0, manual 2.4.0
sanctrl
marked this pull request as ready for review
November 20, 2026 00:57
sanctrl
enabled auto-merge (squash)
November 20, 2026 00:57
…AGENTCHAT_CONVERSATION_ID); drop the stale pin note
sanctrl
disabled auto-merge
November 20, 2026 01:23
…er outlives its test Windows CI failed the two could-not-process e2e tests: every run of the stand-in command that exited 1 came back `not_started` with `spawn "<command>" ENOENT`, so no failure was ever reported. The cause is the engine's spawnRun: shell runs go through cross-spawn, whose Windows hook re-emits every exit 1 of a shell spawn as ENOENT. Fixed in agent-core (agentchatme/agentchat-agent-core#28); the CLI picks it up with the engine pin at the release step. - A CommandRunner test pins the contract directly: a command that ran and exited 1 is `failed` with exit 1, never "not found". - The e2e tests stop every listener and watcher they started in afterEach (bounded at twice the engine's 10 s stop grace), so a test that fails before its own abort no longer leaves a listener running into the next test and spawning from a folder that is gone.
…check), agentchatme ^1.5.0; fake runtimes answer with a finished turn
sanctrl
enabled auto-merge (squash)
November 20, 2026 10:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
The listener's side of one run per conversation and could not process, on the engine from agentchatme/agentchat-agent-core#27 (released as 0.7.0) and
agentchatme1.5.0 (agentchatme/agentchat-typescript#31).listen --runandlisten --presetstart one run for each conversation that owes a reply (one at a time) and one run for pending invites, instead of one run for the whole tray. A server without that prompt still gets one run for the tray.--runcommand's environment now comes from the engine'srunContextEnv:AGENTCHAT_WAKE_KINDisconversation,inviteorwake; a conversation run also getsAGENTCHAT_CONVERSATION_ID; every other run never inherits one (an inherited value is removed).RUN_ENV.conversationIdnames it.forwardkeeps one POST per wake (conversationRuns: false): its receiver reads the whole tray itself. The foreground and the installed listener now take their loop options from one function (listenerRunOptions), so the two cannot drift.--runcommand has no runtime check, so its failed conversation run is reported only withother_run_completedevidence (within 10 minutes), and never while every run fails; the presets use the engine's runtime check (runtime_check);forwardreports nothing. Documented in the README and incommand-runner.ts.statusanddoctorshow the engine's could-not-process lines (the CLI's identity commands are the engine's): the paused conversations and until when, the counts, the last run's conversation, anddoctor'scould-not-processwarning.listen --uninstallnow also removescould-not-process.json(the engine's updatedclearIntegrationStatus); README, CHANGELOG and the uninstall test say so.listen,listen --install,--helpandwatchsay how a wake becomes runs. README (a Could not process section, the env table) and CHANGELOG (Unreleased).Windows: needs the engine with agentchatme/agentchat-agent-core#28. The branch pins agent-core 0.7.0 (release commit
43b13f8). On Windows that engine reports every--runcommand line that exits 1 asnot_startedwithspawn "<command>" ENOENT:spawnRun({ shell: true })goes through cross-spawn, whose Windows hook (lib/enoent.js,verifyENOENT) re-emits any exit 1 of a shell spawn, where it resolved no file, as an ENOENT error.cmd.exe /cexits 1 both for a command it cannot find and for a command that ran and failed, and the hook assumes the first. So a Windows owner's command that failed with 1 was said to be missing and never counted as a could-not-process failure. This bug was already there before this PR (a failing--runcommand on Windows was always shown as "not found"); this PR's tests are the first to run a failing--runcommand on Windows. It is not a rewrite or unlink of the stand-in script (the same file ran fine for the other conversation), not a run after the temp dir went, and not the CLI's quoting (exit 2 from the same command line is classified correctly). The fix is in the engine (#28: shell runs use Node's own spawn and keep the exit code; the stdout rule tells "not found" from "ran and failed"), so the CLI'ssrc/does not change. Windows CI here stays red until the pin moves to an engine with #28, which should be 0.7.1 at the release step.Verification
88fa768): the newCommandRunnertest (exit 1 after output must befailed) and the two could-not-process e2e tests, all withspawn … ENOENT. With the #28 engine packed and vendored in throwaway draft [do not merge] CI proof: CLI on Windows with the agent-core#28 shell-run fix #17 (closed after the run), Windows passed on three attempts in a row (jobs 136018625739, 136020681738, 136022395791; each runs the suite on Node 22, 24 and 26: 109 passed, 4 skipped, no ENOENT). On Linux and macOS, 0.7.0 is green. #28's own CI: Windows fails on the tests-only commit and passes with the fix.Earlier, with the linked engine (
c7e1f1a) and SDK (1.5.0):pnpm type-checkok,pnpm buildok,pnpm test8 files, 111 passed, 1 skipped (112),bash scripts/release-smoke.shok, gitleaks on the commits: no leaks. New end-to-end tests against the server double: one run per conversation (each toldAGENTCHAT_CONVERSATION_ID, prompted for that conversation alone, the invite run without one, an inherited id never reaching a run); a command failing for one conversation reported withother_run_completed; every run failing reports nothing; apausedanswer said in the status file; forward with the template still one POST per wake carrying both conversations (checked to fail withconversationRuns: true); both presets' runtime check as evidence (fixed prompt, no AgentChat tools, no key; the fake Claude Code answers the JSON result the engine's check now judges). Unit tests forcommandRunEnv,listenerRunOptionsand a--runcommand that exits 1 (failed, never "not found"); the e2e tests now stop every listener they started inafterEach, so a failing test no longer leaves one running into the next;status/doctorlines from a status file. The engine PR head's own suite against the SDK PR head: 39 files, 618 passed, 3 skipped.Risk and rollback
--runcommand that relied on one run per wake for the whole tray now runs once per conversation; its prompt andAGENTCHAT_WAKE_KINDsay which. A server without the per-conversation prompt keeps the old behaviour.--runusers: a command that exits 1 is shown as "not found" until the CLI bundles an engine with #28.