Repository navigation
fix(agents): prefer background completion wake over polling - #60877
vincentkoc merged 8 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5336e9d3ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Greptile SummaryThis PR tightens exec/process tool descriptions and the agent system prompt to steer "start now, tell me when done" work toward the existing automatic completion-wake path instead of repeated The only gap worth noting: Confidence Score: 5/5Safe to merge — changes are prompt/description copy only with no runtime behavior changes. All findings are P2 (style/test-coverage gap). The code changes are correct, additive, and low-risk. Both cron and no-cron paths emit the completion-wake guidance as intended; the only gap is a missing explicit system-prompt test for the no-cron else-branch. src/agents/system-prompt.test.ts — consider adding a no-cron toolNames test case to cover the else-branch added in system-prompt.ts.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85640e9c20
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3012b0c5e2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1b6424edf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const processToolSummary = "Manage background exec sessions for commands already started"; | ||
| "Run shell commands (pty available for TTY-required CLIs; use for work that starts now, not delayed follow-ups; background completion may wake automatically when enabled)"; | ||
| const processToolSummary = | ||
| "Manage background exec sessions for commands already started (poll/log for inspection, debugging, input, intervention, or completion confirmation when auto-wake is unavailable)"; |
There was a problem hiding this comment.
Fix process summary to map poll/log to correct actions
The updated processToolSummary describes poll/log as tools for “input” and “intervention,” but those capabilities are handled by other process actions (write, send-keys, submit, paste, kill) rather than poll/log. In interactive sessions that block on stdin, this wording can steer the model toward repeated polling instead of sending input, leaving commands stuck and delaying user updates. Please align this summary with the actual action semantics so poll/log are framed as inspection/status only.
Useful? React with 👍 / 👎.
…#60877) * fix(agents): prefer completion wake over polling * fix(changelog): note completion wake guidance * fix(agents): qualify quiet exec completion wake * fix(agents): qualify disabled exec completion wake * fix(agents): split process polling from control actions
…#60877) * fix(agents): prefer completion wake over polling * fix(changelog): note completion wake guidance * fix(agents): qualify quiet exec completion wake * fix(agents): qualify disabled exec completion wake * fix(agents): split process polling from control actions
…#60877) * fix(agents): prefer completion wake over polling * fix(changelog): note completion wake guidance * fix(agents): qualify quiet exec completion wake * fix(agents): qualify disabled exec completion wake * fix(agents): split process polling from control actions
…#60877) * fix(agents): prefer completion wake over polling * fix(changelog): note completion wake guidance * fix(agents): qualify quiet exec completion wake * fix(agents): qualify disabled exec completion wake * fix(agents): split process polling from control actions
…#60877) * fix(agents): prefer completion wake over polling * fix(changelog): note completion wake guidance * fix(agents): qualify quiet exec completion wake * fix(agents): qualify disabled exec completion wake * fix(agents): split process polling from control actions
…#60877) * fix(agents): prefer completion wake over polling * fix(changelog): note completion wake guidance * fix(agents): qualify quiet exec completion wake * fix(agents): qualify disabled exec completion wake * fix(agents): split process polling from control actions
…#60877) * fix(agents): prefer completion wake over polling * fix(changelog): note completion wake guidance * fix(agents): qualify quiet exec completion wake * fix(agents): qualify disabled exec completion wake * fix(agents): split process polling from control actions
Summary
processfor normal completion handling instead of relying on the existing push-style notify-on-exit path.exec/processdescriptions so background-now work prefers automatic completion wake, whileprocessis framed as an inspection/intervention tool.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
processremained framed heavily around polling, even thoughexeccompletion already wakes the agent via system event + heartbeat.Regression Test Plan (if applicable)
src/agents/system-prompt.test.ts,src/agents/bash-tools.test.tsprocessas on-demand inspection/intervention.User-visible / Behavior Changes
Agents should now be more likely to:
cronfor future-time follow-ups,execfor work that starts now,processmainly for logs, status, input, or intervention.Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
exec,process, and optionallycronenabled.Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
git diff --check; directbun -eassertions for cron-enabled prompt guidance, no-cron fallback guidance, andexec/processdescriptions.pnpm test -- ...runs forsrc/agents/system-prompt.test.tsandsrc/agents/bash-tools.test.tsstarted Vitest but did not return a clean pass/fail signal in this environment.Review Conversations
Compatibility / Migration
Risks and Mitigations
process polleven when a user explicitly wants active monitoring.processfor logs, status, input, and intervention; only the default path changes.