fix(exec): route notifyOnExit through exec-event and add heartbeat completion tracing#42394
fix(exec): route notifyOnExit through exec-event and add heartbeat completion tracing#42394ChauncyZhang wants to merge 1 commit into
Conversation
Greptile SummaryThis PR standardizes the async Key observations:
Confidence Score: 4/5
Last reviewed commit: d375663 |
|
We reproduced this bug live on Discord and confirmed that the minimal wake-reason change in #41479 resolves the local background-exec completion-notification failure for us. So from our downstream validation:
I’m linking this here because it appears architecturally aligned with what we saw in production, but the exact live-validated fix in our environment was the narrower change from No objection to the broader cleanup here — just noting that the concrete live proof we have maps most directly to #41479. Related exact minimal fix: #41479 |
Summary
Describe the problem and fix in 2–5 bullets:
execcompletion notification path was not using the canonical exec-event wake flow.notifyOnExit, route completion throughemitExecSystemEvent(...)unified path.exec finished: ...so exec-completion filters can reliably detect it.exec-event(instead of dynamicexec:<id>:exit) for consistent heartbeat reason handling.bash-tools.test.tsto match new completion text + wake reason.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
exectasks.agents.defaults.heartbeat.target = "last"to relay async completion back to current chat.Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
openai/gpt-5.3-codexagents.defaults.heartbeat.target = "last"Steps
execflow (e.g., clone repo via chat task).Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes)Yes)Yes)agents.defaults.heartbeat.target = "last"if async completion should return to current chat.Failure Recovery (if this breaks)
src/agents/bash-tools.exec-runtime.tssrc/agents/bash-tools.test.tsagents.defaults.heartbeat.targetRisks and Mitigations
agents.defaults.heartbeat.target = "last"in runtime config.