Commit Graph
1904 Commits
Author SHA1 Message Date
usr-bin-roygbiv b1ce77c109 fix(gemini): recover malformed and thought-only turns 2026-08-14 01:35:21 +00:00
roboompandcan1357 6fc50c3e41 fix(coding-agent): prevented post-yield TUI stalls
Kept the Bun event loop live across subagent yield drains and delayed parent result flushes. Added a timer-lifecycle regression for the idle flush.

Fixes #8462
2026-08-14 00:01:31 +02:00
can1357 eadfbcb689 Merge PR #8440: fix(discovery): honor Claude config directory (@roboomp) 2026-08-13 18:01:31 +02:00
roboomp 3629464cf9 fix(discovery): honored claude config directory
Resolved Claude user configuration, plugin, MCP, and session paths through CLAUDE_CONFIG_DIR while retaining the legacy defaults.

Fixes #8436
2026-08-13 15:33:27 +00:00
roboomp 7463803c95 fix(extensions): populated runtime mode in context
Expose the Pi-compatible tui, rpc, json, or print host mode to every extension context and cover mode transitions in the runner regression suite.

Fixes #8419
2026-08-13 08:51:05 +00:00
can1357 2d512cb253 refactor: generalized thinking loop guard for multiple model families
- Generalized thinking loop guard and helper functions to support Gemini, DeepSeek, and Grok model families.
- Replaced `withGeminiThinkingLoopGuard` and related Gemini-specific symbols with generalized counterparts.
- Removed deprecated `enableGeminiThinkingLoopGuard` options and associated tests.
- Updated test suites and agent session logic to use the generalized thinking loop guard and model family tokens.
2026-08-13 06:15:00 +02:00
can1357 e8eed95130 feat(coding-agent): introduced fine grained per agent advisor configuration
- Replaced blanket subagent advisor global settings with fine-grained per-agent configuration and frontmatter support.
- Added dashboard keybindings and inline override editors for managing agent advisor patterns.
- Implemented settings migration logic to convert legacy global options into per-agent settings.
- Updated session persistence and execution layers to restore and enforce per-agent advisor behaviors.
2026-08-13 04:59:50 +02:00
can1357 3e28a1afb4 feat(coding-agent): implemented threshold for demoting interrupted thinking
- Added a 60-character minimum length threshold for demoting interrupted thinking into hidden continuity context in agent-session.ts.
- Updated LLM message conversion in messages.ts to strip incomplete thinking from user-interrupted assistant turns regardless of continuity note presence.
- Added test coverage in agent-session-interrupted-thinking.test.ts verifying behavior for reasoning lengths below and at the threshold.
2026-08-13 02:16:08 +02:00
can1357 61e12988fe Merge PR #8283: fix(coding-agent): skip idle mid-turn persistence waits (@ethancawse) 2026-08-13 02:00:50 +02:00
can1357 2dddba9fe4 Merge PR #8199: fix(coding-agent): gate prompt tool mentions on session tool availability (@szavadsky)
# Conflicts:
#	packages/coding-agent/src/prompts/system/orchestrate-notice.md
#	packages/coding-agent/src/prompts/system/plan-mode-active.md
#	packages/coding-agent/src/prompts/system/project-prompt.md
#	packages/coding-agent/src/prompts/system/system-prompt.md
2026-08-13 01:18:42 +02:00
can1357 3bc6269dbe Merge PR #8339: fix(coding-agent): normalize WebP for STB-backed models (@ethancawse) 2026-08-13 01:14:54 +02:00
can1357 eafefaccf7 Merge PR #8337: fix(usage): use authoritative OpenCode Go quotas (@will-bogusz) 2026-08-13 01:14:53 +02:00
can1357 30f078c6fa Merge PR #8185: fix(session): resolve wire-name aliases in hasBuiltInTool (@roboomp) 2026-08-13 01:14:50 +02:00
can1357 79952d8740 Merge PR #8169: fix(rpc): strip snapcompact archive from compact result (@roboomp) 2026-08-13 01:14:50 +02:00
can1357 e8782235e2 Merge PR #8097: fix(cli): surface actionable error when auth broker is unreachable (@roboomp) 2026-08-13 01:14:47 +02:00
can1357 932bb6d244 Merge PR #8080: fix(session): forward retry fallback events to extensions (@roboomp) 2026-08-13 01:14:47 +02:00
can1357 a5434d7341 Merge PR #8076: fix(advisor): preserve advisor fallback role ownership (@roboomp) 2026-08-13 01:14:47 +02:00
can1357 abc1897fc3 fix(agent): fit retry fallback against retry prompt 2026-08-13 01:14:46 +02:00
can1357 f73baac583 Merge PR #8068: fix(agent): fit-check retry fallback before switching models (@roboomp) 2026-08-13 01:14:46 +02:00
Ethan Cawse 8be57a0ce6 fix(coding-agent): normalize native WebP replay 2026-08-12 11:27:27 -04:00
Ethan Cawse 001460ee8a fix(coding-agent): normalize WebP on provider path 2026-08-12 08:36:28 -04:00
Will Bogusz 9eff02d36c fix(usage): use authoritative OpenCode Go quotas 2026-08-12 13:26:01 +02:00
Ethan Cawse 7b0d12ee63 fix(coding-agent): detach noncloneable message metadata 2026-08-11 23:20:41 -04:00
Ethan Cawse 2cd25fb4ee fix(coding-agent): normalize WebP for custom STB models 2026-08-11 23:07:21 -04:00
Ethan Cawse 7ab6b554f6 fix(coding-agent): isolate message-end notifications 2026-08-11 23:03:11 -04:00
Ethan Cawse a457173750 fix(coding-agent): preserve persistence after listener failures 2026-08-11 23:03:10 -04:00
Ethan Cawse 94b865be6f fix(coding-agent): skip idle mid-turn persistence waits 2026-08-11 23:03:10 -04:00
can1357 19c0afcc0d feat: implemented external thinking flags and transport reasoning controls
- Added the `--external-thinking` CLI flag alongside model capability checks to gate external thinking tool availability.
- Updated Anthropic and Google transports to honor `forceReasoningOff` for native thinking-off controls.
- Renamed the `thoughts` property and parameter to `notes` across think fixtures, tools, and tests.
- Updated system prompt instructions and test suites to verify transport-specific thinking and tool activation.
2026-08-12 02:23:17 +02:00
can1357 fe837038e9 Merge PR #8262: fix(coding-agent): copy local artifacts across handoff session boundary (@roboomp) 2026-08-12 01:53:44 +02:00
can1357 10fd42289c feat: introduced external thinking support and private scratchpad think tool
- Added support for external thinking and forced reasoning disablement across AI provider options and request transformers.
- Implemented the private scratchpad think tool along with its renderer, system prompt rules, and schema configuration.
- Updated agent session management and SDK tools to support dynamic runtime activation of the think tool via the externalThinking setting.
- Added comprehensive unit tests covering reasoning fallbacks, tool activation, and rendering behavior.
2026-08-11 20:39:57 +02:00
roboomp dbc199d2db fix(coding-agent): copy local artifacts across handoff session boundary
/handoff mints a fresh session via newSession(), producing a new
artifactsDir and an empty local/ root. The handoff document routinely
references plans and scratch files under '/data/workspaces/can1357__oh-my-pi__8261/.omp-session/2026-08-11T16-39-09-489Z_019ff1b1-31b1-7000-81f5-c540f4ebf43d/local/,' so every reference
became a dangling pointer in the new session. The plan approve-and-execute
path already copies artifacts across the boundary; handoff did not.

Extracted the plan-approve copy helper into a shared copyLocalArtifacts()
in local-protocol.ts and invoke it across the handoff session switch
(best-effort, since the switch is already committed).

Fixes #8261
2026-08-11 16:45:15 +00:00
can1357 47b282ff9b Merge PR #8069: fix(extensions): register lifecycle tools (@mrexodia) 2026-08-11 15:24:18 +02:00
can1357 ca6e13fd47 Merge PR #8218: fix(agent): park subagents on shutdown (@roboomp) 2026-08-11 15:18:17 +02:00
can1357 3b66177abd Merge PR #8226: fix(advisor): accept silent Gemini reviews (@roboomp) 2026-08-11 15:15:44 +02:00
can1357 2670dc345c Merge PR #7930: fix(coding-agent): let a classifier refusal cascade when its tool calls never ran (@mvid)
# Conflicts:
#	packages/coding-agent/src/session/turn-recovery.ts
2026-08-11 15:09:34 +02:00
can1357 7e8be71ead Merge PR #7247: fix(advisor): prevent false full replays and preserve cache growth (@cuipengfei) 2026-08-11 15:07:43 +02:00
can1357 55d1831dd3 Merge PR #8152: perf(session): weakly cache conversion histories (@MikeeI) 2026-08-11 15:06:15 +02:00
can1357 5ba362777a Merge PR #8149: perf(session): reuse parsed journal during resume (@MikeeI) 2026-08-11 15:06:15 +02:00
can1357 6592b799b3 Merge PR #7980: fix(session): attribute a run to the model that produced its output (@enieuwy) 2026-08-11 15:06:12 +02:00
roboomp 86b8f510c8 fix(advisor): accepted silent Gemini reviews
Allowed advisor streams to treat Google STOP responses without visible content as successful silence while preserving the default retry behavior for interactive agents.

Added provider and advisor-path regressions covering retry counts, system instructions, and the advise declaration.

Fixes #8223
2026-08-11 08:22:54 +00:00
roboomp 546016596e fix(agent): scope shutdown reason to the owning session
Every session dispose broadcast the shutdown abort reason, so an explicit
hard kill of a subagent (release with tombstone, then live.dispose()) tagged
its nested children as shutdown and rediscovered them as parked instead of
terminal.

- Gate ASYNC_JOB_MANAGER_SHUTDOWN_REASON on #ownedAsyncJobManager so only the
  top-level owning session's dispose (genuine process shutdown) uses it.
- Subagent disposes propagate a generic cancellation, keeping nested children
  terminal.
- Cover the subagent generic-cancel path alongside the owning-session shutdown.

Fixes #8216
2026-08-11 06:40:44 +00:00
roboomp 8614979281 fix(agent): tag owned jobs with shutdown reason before dispose
Session teardown pre-cancels owner jobs via #cancelOwnAsyncJobs before
manager.dispose(), so the shutdown abort reason must ride along that
cancelAll or an owned subagent job sees a generic caller signal and is
tombstoned instead of parked.

- Forward an abort reason through AsyncJobManager.cancelAll.
- Pass ASYNC_JOB_MANAGER_SHUTDOWN_REASON from #disposeOwnedAsyncJobs.
- Cover owned-job shutdown tagging through a real AgentSession dispose.

Fixes #8216
2026-08-11 06:32:46 +00:00
Slava Zavadsky b6a3862ebc fix(coding-agent): gate prompt tool mentions on session tool availability
System and mode prompts referenced tools that may be absent from the
session catalog, forcing the model to satisfy requirements it cannot
execute (generalizes #8139's browser-verification mismatch):

- system-prompt.md: browser verification now keys on the actual UI
  surface and available tools (browser/computer/TUI/CLI), with an
  explicit behavioral/smoke-test fallback when no runtime tool exists;
  todo workflow guidance and the AST-section grep hint are gated on
  tool presence; the auto-QA report_issue block additionally requires
  the write tool.
- project-prompt.md: workspace-tree drill-in and additional-roots tool
  hints only name tools present in the session.
- plan-mode-active.md: ask-tool directives get a prose fallback and
  scout-via-task dispatch is gated on the task tool (render site now
  passes askAvailable/taskAvailable).
- orchestrate-notice.md: the tool budget, verify gates, todo tracking,
  and inline-edit guidance are gated on tool presence; the notice is
  skipped entirely when the task tool is inactive (render fn takes the
  active tool list).

Adds regression tests for each gate; changelog entry.
2026-08-10 20:24:34 -04:00
roboomp ec411d60b6 fix(session): resolve wire-name aliases in hasBuiltInTool
The renderer-provenance gate (PR #7774) keys the built-in tool renderer
registry on `hasBuiltInTool(name)`. In apply_patch mode the built-in `edit`
tool presents on the wire as `apply_patch` (`customWireName`), and tool cards
render the streamed call under that wire name. `hasBuiltInTool` only checked
literal registry names, so `hasBuiltInTool("apply_patch")` was false and the
edit renderer/preview was skipped.

Resolve a built-in tool's `customWireName` alias to its built-in owner, while
still letting an extension that registers the literal alias name shadow it
(the agent loop routes exact-name matches ahead of wire aliases).

Fixes #8184
2026-08-10 20:20:34 +00:00
roboomp 1451f9a1b9 fix(rpc): stripped snapcompact archive from auto compaction event too
The auto_compaction_end event and its frame-rescue variant emitted the unstripped snapcompact preserveData, forcing the RPC shrink ladder on every unattended pass and risking a silently dropped event. Strip the archive from both event payloads while keeping it in the persisted compaction entry.

Fixes #8168
2026-08-10 16:00:22 +00:00
roboomp 6f2c931012 fix(rpc): stripped snapcompact archive from compact result
Kept the frame archive in the persisted compaction entry while omitting it from the returned CompactionResult, preventing protocol v1 from reporting a false failure after a completed manual compaction.

Fixes #8168
2026-08-10 15:46:32 +00:00
Bonobo 3321be5055 perf(session): weakly cache conversion histories
Why:
The module-global array memo strongly retains the most recently converted
transcript and output after its session is disposed.

Changes:
- Store exact-repeat and append-growth state in a WeakMap per input array.
- Preserve generation invalidation and per-message weak caching.

Evidence:
- Seven disposal runs collected both arrays after 50 forced-GC passes and
  reduced median heap delta by 87.54%.

Refs #8119
2026-08-10 04:09:44 +02:00
Bonobo 00fc4d5376 perf(session): reuse parsed journal during resume
Why:
SessionManager.open() parses the complete journal for its header and then
setSessionFile() parses the same journal again.

Changes:
- Reuse the entries already loaded by open() through a private setup path.
- Keep the public setSessionFile() contract unchanged.

Evidence:
- A 19.98 MB, 12,000-entry journal improved from 48.011 ms to
  25.406 ms median across 15 runs with identical restored state.

Refs #8117
2026-08-10 04:08:09 +02:00
Duncan Ogilvie 47f7fb0f0d fix(mcp): activate only retained manager tools 2026-08-10 02:24:30 +02:00
Duncan Ogilvie 158a70ad54 fix(extensions): preserve MCP ownership on refresh 2026-08-10 02:09:23 +02:00