Commit Graph

1446 Commits

Author SHA1 Message Date
can1357 bf15acb25d fix(coding-agent): hub cancel reaches the registration behind a settled job row
A budget-aborted keep-alive subagent's job row (job id == agent id) settles
failed and is retained ~5 min; executeCancel short-circuited to
already_completed for that window, leaving the zombie registration
unkillable exactly when the user wants it dead. Fall through to
cancelAgentRegistration for settled rows; keep already_completed when no
lingering registration exists.

Also stop wiring AgentLifecycleManager.global() onto SDK sessions created
with a caller-supplied agentRegistry: the global lifecycle releases through
AgentRegistry.global(), so it would report a cancel while releasing an
unrelated global ref. Without a lifecycle, cancel falls back to
dispose + unregister on the session's own registry.

Addresses both Codex P2 review findings on #6319.
2026-07-23 11:37:13 +02:00
can1357 9756fea7af Merge PR #6319: fix(coding-agent): let hub cancel kill a jobless agent registration (@roboomp) 2026-07-23 11:37:13 +02:00
roboomp f56ad1ae06 fix(coding-agent): let hub cancel kill a jobless agent registration
A keep-alive subagent force-stopped for exceeding its soft request budget
is kept resumable (status idle, adopted by AgentLifecycleManager) so its
context can be salvaged, but its async job row settles and is reaped after
~5 min. After that, hub cancel <id> only reported "Background job not
found" because executeCancel consulted AsyncJobManager alone, leaving the
registration unkillable short of a broker restart.

hub cancel now falls through to the agent registration when no live job
matches: for a sub the caller spawned, it aborts any in-flight turn,
disposes the session, and releases it from the lifecycle. Cross-agent
kills stay impossible and Main/advisor refs are never targeted.

Fixes #6315
2026-07-22 19:45:45 +00:00
can1357 741aaa301d Merge PR #5895: feat(tui): allow re-answering a past ask from the session tree (@Mathews-Tom) 2026-07-22 21:13:23 +02:00
can1357 c5489fa5c5 Merge PR #6222: fix(write): reject unknown URI-like targets (@roboomp) 2026-07-22 21:13:20 +02:00
can1357 13e7f29bc4 Merge PR #6296: fix(tools): cap per-tool default timeout with tools.maxTimeout (@roboomp) 2026-07-22 21:13:20 +02:00
roboomp 3c1fbdd3f3 fix(coding-agent/launch): surfaced pre-ready exits in TUI
The model-facing start content reported when a process exited before readiness,
but launchRenderResult rebuilt the interactive result solely from structured
details and dropped that explanation. Mirror the terminal-without-readyAt
condition in the TUI start renderer and add a renderer contract test.

Fixes #6303
2026-07-22 16:43:35 +00:00
roboomp 87552aae30 fix(coding-agent/launch): woke ready waits on sticky marker not live state
hub start and for:"ready" waits polled the live daemon state, so a process
that flipped starting→ready→exited within one 50ms poll interval was only
ever observed as "exited" and the wait blocked for the full readiness
timeout — despite #markReady durably recording readyAt. A pre-ready exit
had the same failure since terminal states only woke the wait during broker
shutdown.

Wake both waits on readyAt !== undefined || terminalState(state); readyTimedOut
= !ready then falls out. The start renderer reports "Process exited before
readiness was observed." for a pre-ready exit. Adds two regression tests that
hang to their caps on the old code.

Fixes #6303
2026-07-22 16:29:38 +00:00
roboomp 1b6588e520 fix(tools): cap per-tool default timeout with tools.maxTimeout
clampTimeout resolved the per-tool default (bash 300s) whenever the agent
omitted `timeout` and only enforced the tool's own min/max, so the
tools.maxTimeout global ceiling — applied solely in sdk.ts on explicitly
numeric args — was bypassed on the common default-fallback path.

Thread maxTimeout into clampTimeout so the resolved effective timeout,
including the default path, is capped before the per-tool floor/ceiling
apply. Explicit values below the cap still win; maxTimeout <= 0 stays
no-cap. Applied at every call site (bash, eval, browser, debug, lsp,
fetch, and the session-level bash executor), and the bash clamp notice
now names the global ceiling when it is the binding limit.

Fixes #6294
2026-07-22 15:18:27 +00:00
roboomp b2e7e34567 fix(write): let conflict:// writes reach the resolver
- Exempted the handler-less conflict:// scheme from the URI-like guard so parseConflictUri still splices registered blocks.
- Extended the near-miss regression to assert conflict://1 reaches the resolver.

Fixes #6123
2026-07-21 22:33:33 +00:00
roboomp ea5c816e65 fix(write): rejected unknown uri-like targets
- Blocked malformed and unregistered URI-like paths before filesystem resolution.
- Suggested canonical xd:// spelling while preserving explicitly escaped local paths.
- Added regression coverage for xdt://, xd:/, and xd/ near misses.

Fixes #6123
2026-07-21 21:19:53 +00:00
Mathews-Tom d7f6ce5e04 Merge remote-tracking branch 'upstream/main' into feat/tree-ask-reanswer 2026-07-21 19:25:33 +05:30
can1357 5a728dacaa fix(tools): restored baseline empty-yield guidance wording after #4961 merge 2026-07-20 22:57:11 +02:00
can1357 a87d7d35cd Merge PR #4961: fix(agent): stop malformed subagent yield loops (@roboomp)
# Conflicts:
#	packages/coding-agent/src/prompts/system/workflow-notice.md
#	packages/coding-agent/src/task/executor.ts
#	packages/coding-agent/src/tools/yield.ts
2026-07-20 22:51:53 +02:00
can1357 4b7377bd5b Merge PR #5974: fix(tools): keep web_search top-level under xdev (@roboomp) 2026-07-20 22:50:05 +02:00
Mathews-Tom ab1d7db7d1 Merge remote-tracking branch 'upstream/main' into feat/tree-ask-reanswer
# Conflicts:
#	packages/coding-agent/src/modes/controllers/selector-controller.ts
2026-07-19 15:02:33 +05:30
can1357 8f2cd23e39 Revert "Merge PR #5812: fix(read): honor exact line selector bounds (@roboomp)"
This reverts commit 58c71d5b50, reversing
changes made to 7c7227bc8e.
2026-07-18 22:04:43 +02:00
can1357 4617d71ba7 fix(browser): keep raw AbortSignal identity through run facade
Native combinators (AbortSignal.any, fetch) brand-check internal slots
that a Proxy cannot forward; return signals unwrapped from
bindBrowserRunFacade so tab.signal composes with native cancellation.
2026-07-18 21:04:16 +02:00
can1357 707932e786 Merge PR #5588: fix(browser): observe raw promises before target close (@serverinspector)
# Conflicts:
#	packages/coding-agent/src/tools/browser/tab-worker.ts
#	packages/coding-agent/test/tools/browser-tab-evaluate.test.ts
2026-07-18 21:04:16 +02:00
can1357 30ef04940f Merge PR #5424: fix(github): add dedicated repository file reads (@roboomp)
# Conflicts:
#	packages/coding-agent/src/prompts/tools/bash.md
#	packages/coding-agent/src/prompts/tools/read.md
2026-07-18 21:03:24 +02:00
can1357 046d92ec81 Merge PR #5062: fix(tui): show async task job model badges (@roboomp) 2026-07-18 21:01:41 +02:00
can1357 31f7aa6d58 Merge PR #5778: fix(browser): reject non-string tab selectors with a named error (@roboomp)
# Conflicts:
#	packages/coding-agent/src/prompts/tools/browser.md
#	packages/coding-agent/src/tools/browser/aria/aria-snapshot.ts
2026-07-18 20:13:44 +02:00
can1357 22b2a1d8f0 Merge PR #5789: fix(browser): support authenticated cmux TCP relays (@roboomp) 2026-07-18 20:12:47 +02:00
can1357 f560db8cfe Merge PR #5810: fix(lsp): raise timeout ceiling to 300 seconds (@roboomp) 2026-07-18 20:12:46 +02:00
can1357 58c71d5b50 Merge PR #5812: fix(read): honor exact line selector bounds (@roboomp) 2026-07-18 20:12:46 +02:00
can1357 6c8b0f4a2f Merge PR #5906: fix(browser): bound scroll renderer acknowledgement wait (@roboomp) 2026-07-18 19:57:44 +02:00
can1357 ab77aeb245 Merge PR #5989: fix(coding-agent): enable js-debug child sessions (@roboomp) 2026-07-18 19:42:50 +02:00
can1357 3d8cd494ec Merge PR #5997: fix(agent): preserve side-effecting hub outcomes (@roboomp) 2026-07-18 19:42:37 +02:00
can1357 b95a25820f Merge PR #6005: fix(browser): isolate request interception per run (@roboomp) 2026-07-18 19:42:36 +02:00
roboomp e0358b77a0 fix(browser): unregister fired once request handlers
- Removed the once wrapper from Puppeteer's request emitter on first fire so it cannot leak into later runs.
- Added regression coverage asserting a fired once handler leaves zero residual request listeners.

Fixes #6004
2026-07-18 16:31:10 +00:00
roboomp fe2fdf6564 fix(browser): isolated request interception per run
- Removed run-scoped Puppeteer request handlers and disabled interception on every browser.run exit path.
- Recycled workers when bounded interception cleanup cannot restore the tab, with raw CDP recovery for held requests.
- Added live Chromium coverage for held requests, normal traffic restoration, and thrown setup calls.

Fixes #6004
2026-07-18 16:22:40 +00:00
can1357 1a6fc09611 feat(tools): added bare ARIA ref support in browser actions, fixed select() double-count
- Added bare `eN`/`@eN` regex to `parseAriaRefSelector` so agents can copy refs straight from snapshot output.
- Applied ref resolution to `press`, `screenshot`, `drag`, `select`, and `uploadFile` action handlers.
- Fixed `#select` to assign the full option set first then read back, avoiding double-counting when unselecting mid-loop.
2026-07-18 17:51:54 +02:00
roboomp a713b941dc fix(agent): preserved side-effecting hub outcomes
Resolved tool interruptibility from each call's raw arguments so mixed-operation tools can keep side-effecting calls non-interruptible.

Restricted the unified hub to interrupt passive waits and followed logs while preserving start, send, and lifecycle operation results.

Fixes #5995
2026-07-18 14:41:19 +00:00
roboomp 61fdd4dfbc fix(coding-agent): enabled js-debug child sessions
Added TCP server transport for vscode-js-debug and recursively handled startDebugging requests, breakpoint synchronization, active child routing, and tree cleanup.

Fixes #5984
2026-07-18 11:56:42 +00:00
roboomp e99d565e21 fix(tools): keep web_search top-level under xdev
web_search is a discoverable built-in, so with tools.xdev defaulting to
true createTools mounted it under xd:// and dropped it from the top-level
toolset. Models that call web_search directly got "Tool web_search not
found" on default configs. Pin it in XDEV_KEEP_TOP_LEVEL so it stays a
direct-callable tool while other discoverable tools keep mounting.

Fixes #5973
2026-07-18 09:17:20 +00:00
roboomp 4e216a3b98 fix(browser): canceled settled scroll timers
- Replaced the losing Bun.sleep with an unrefed timeout cleared in a finally block.
- Added regression coverage that verifies prompt wheel acknowledgements leave no timer behind.

Fixes #5905
2026-07-17 20:10:01 +00:00
roboomp b8ef46a0c8 fix(browser): bounded scroll acknowledgement wait
- Released tab.scroll after two seconds when a queued wheel event waits on a busy renderer acknowledgement.
- Preserved immediate dispatch failures and added regression coverage for both outcomes.

Fixes #5905
2026-07-17 20:02:53 +00:00
Mathews-Tom 8ae0625bae Merge remote-tracking branch 'upstream/main' into feat/tree-ask-reanswer 2026-07-18 01:17:40 +05:30
can1357 8c546bda77 Merge PR #5816: fix(tools): recognize zip-family archives and prune unconvertible extensions (@roboomp) 2026-07-17 21:22:07 +02:00
can1357 089eec18e6 Merge PR #5811: fix(read): refresh URL responses on each invocation (@roboomp) 2026-07-17 21:22:07 +02:00
can1357 3de62abccb Merge PR #5878: fix(tui): keep active todo visible in collapsed views (@roboomp) 2026-07-17 21:22:05 +02:00
can1357 940855608e Merge PR #5865: fix(hub): restore persisted peers after resume (@roboomp) 2026-07-17 21:22:05 +02:00
can1357 754195f5e7 Merge PR #5814: fix(read): support history URL selectors (@roboomp) 2026-07-17 21:22:03 +02:00
Mathews-Tom 0a1013122f Merge remote-tracking branch 'upstream/main' into feat/tree-ask-reanswer 2026-07-18 00:44:26 +05:30
roboomp f662d79ffd fix(tui): keep hidden-pending summary when actives fill the todo cap
selectCollapsedTodos took the active-overflow branch at active.length >= cap, so exactly cap actives plus trailing pending returned the cap rows with an empty summary — the pending work vanished with no '… N more' indicator.

Use a strict '> cap' guard so equality falls through to the normal branch, which counts every hidden row.

Fixes #5873
2026-07-17 18:06:47 +00:00
roboomp 939d6761f7 fix(tui): shared walking-viewport policy for collapsed todos
The first pass anchored a slice on the active task, which still showed completed rows, kept the active item mid-window, and gave the two views divergent selection logic. Per reviewer, replace it with one shared policy both collapsed views run.

selectCollapsedTodos (todo.ts) omits completed/abandoned, pulls every active task (in_progress or subagent-matched pending) to the head in todo order, fills remaining rows with following pending tasks, and emits '… N more active todos' when active work alone exceeds the cap; it falls back to closed tasks for a settled phase so HUD persistence still renders. renderTreeList gains a trailingSummary primitive so item selection lives in the todo domain. The transient tool result reaches live subagent matches via setActiveTodoDescriptionsProvider, wired from interactive mode's observer registry, so both views share the active set.

Fixes #5873
2026-07-17 18:03:13 +00:00
Mathews-Tom fcbcf73769 feat(tui): allow re-answering a past ask from the session tree
Selecting an ask toolResult in /tree previously just repositioned the
leaf onto the stale answer without re-running the interactive picker
(issue #5642). navigateTree() now detects an ask toolResult target and
returns { reopenAsk: { toolCallId, questions } } recovered from the
original toolCall's persisted arguments, instead of mutating anything.
The TUI's tree selector re-opens the ask picker via a standalone
AskTool.execute() call (reusing the live tool-execution UI context),
then calls navigateTree() again with { reanswerAskResult } to branch a
*new* sibling toolResult off the same ask toolCall -- the original
answer's branch stays fully reachable. Non-ask toolResults, and ask
toolResults whose original arguments can't be recovered (legacy/
corrupted sessions), keep the existing plain leaf-move behavior.

This implements direction 2 from the issue's maintainer triage
(re-answer as a new sibling branch), not direction 1 (resuming the
agent turn) or direction 3 (docs-only).
2026-07-17 23:29:35 +05:30
roboomp e6fd29ec21 fix(tui): keep active todo visible in collapsed views
Both collapsed todo renderers took fixed edge slices: the tool result kept the tail eight (truncateFrom start) and the HUD kept the head five (base.slice), so a mid-phase in_progress task fell in the omitted middle of both.

Add an anchorIndex option to renderTreeList that slides the collapsed window over the anchored item with two-sided '… N more' summaries, and anchor both call sites on the in_progress task (HUD falls back to the first subagent-matched pending task).

Fixes #5873
2026-07-17 16:33:28 +00:00
vmcall 4121c19781 test(eval): aligned allowed-agent prompt expectation 2026-07-17 17:38:12 +02:00
vmcall d53cf023b0 fix(task): reconciled structured subagents with upstream
- Preserved the plan-mode capability clamp after upstream removed report_finding.
- Updated persisted-revival coverage for mounted xdev tool activation.
- Applied current formatter output to conflicted runtime files.
2026-07-17 17:38:12 +02:00