Commit Graph

645 Commits

Author SHA1 Message Date
can1357 bd5764aad4 feat(coding-agent): integrated subscription status icons and advisor tracking
- Added theme icons and formatting for subscription status and advisor tracking across status lines and footers.
- Implemented `isAdvisorUsingSubscription` and `isUsingSubscription` methods to check active models against OAuth usage.
- Updated status line model segments to display the new advisor icon instead of text badges.
- Added comprehensive tests covering subscription and advisor costs across multiple font presets.
2026-08-20 05:51:53 +02:00
can1357 45e4fa7884 Merge PR #8492: fix(coding-agent): reclaim dead parked agent corpses on respawn (@roboomp) 2026-08-16 02:43:34 +02:00
MertSoylu 30f92ad986 fix(coding-agent): keep the system prompt byte-stable across date/cwd changes
Move the per-request date/cwd line out of the system prompt into a
first-turn system-reminder so open-weight providers keep their tool-schema
prefix cache; the reminder refreshes itself at midnight. Closes #7404.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-08-14 13:16:54 +03:00
roboomp 2929670a25 fix(coding-agent): preserved cold-revivable parked agents
Consulted the persisted subagent reviver factory before reclaiming an
unadopted parked ref. A valid cold reviver now preserves the existing agent;
factory failures also fail closed rather than deleting a potentially
recoverable generation. Reclaim invariants are rechecked after the async
probe to close lifecycle races.

Added regression coverage proving an unadopted disk-restored ref remains
registered and messageable through ensureLive.

Fixes #8490
2026-08-14 01:40:37 +00:00
roboomp 5421add83b fix(coding-agent): reclaim dead parked agent corpses on respawn
A parked, session-less agent-registry entry with no reviver permanently
poisoned its agent id for the process lifetime. `registerIfAvailable(input,
null)` refuses any existing entry, so a fresh subagent spawn reusing the id
died post-registration with "already owned by another session generation",
and messages to it failed with "is parked and cannot be revived". Such
corpses are left by an isolated run's park or an interrupted construction,
and there was no reclaim or GC path.

Add `AgentLifecycleManager.reclaimDeadCorpse`, which unregisters a ref only
when it is parked, holds no live session, is not owned by the manager (no
in-memory reviver) and has no park/revive in flight. The fresh-spawn path in
`createAgentSession` calls it on a collision and retries registration, so the
id becomes reusable. The registry's strict CAS contract is untouched; the
corpse's transcript stays readable at history://<id>.

Fixes #8490
2026-08-14 01:33:06 +00:00
can1357 a53e4e790d feat(coding-agent/modes): introduced fullscreen agents hub and creation flow
- Replace the obsolete agent dashboard control center with a new fullscreen agents hub component.
- Integrate AI-assisted agent creation architect flow using model sessions.
- Provide interactive property strips and model browser integration for agent configuration.
- Update tests and documentation to support the redesigned agents hub.
2026-08-13 05:09:58 +02:00
can1357 1132c3e31c feat: implemented anthropic keep-alive and migration support for updates
- Added Anthropic prompt-cache refresh scheduling and state management to keep prompts warm across idle sessions.
- Updated pricing models and database stats tracking to calculate and store cost-weighted cache savings.
- Integrated cache savings metrics and efficiency displays into the stats CLI, dashboard routes, and UI components.
- Added support for package renaming, manifest pointer tracking, and installation migration during CLI updates.
2026-08-13 04:59:33 +02:00
Ethan Cawse 001460ee8a fix(coding-agent): normalize WebP on provider path 2026-08-12 08:36:28 -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 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
Duncan Ogilvie 4d5ebd23f9 fix(mcp): replace deferred tool placeholders 2026-08-10 02:17:31 +02:00
Duncan Ogilvie 158a70ad54 fix(extensions): preserve MCP ownership on refresh 2026-08-10 02:09:23 +02:00
Duncan Ogilvie 77916b6c99 fix(extensions): restore activation rollback context 2026-08-10 01:54:36 +02:00
Duncan Ogilvie d1f73de44c fix(extensions): serialize registry mutations 2026-08-10 01:17:23 +02:00
Duncan Ogilvie 36ed07378c fix(extensions): bound detached tool activation 2026-08-10 01:04:02 +02:00
Duncan Ogilvie 4d0c346f87 fix(extensions): abort timed-out tool activations 2026-08-10 00:54:42 +02:00
Duncan Ogilvie 0abb4a9529 fix(extensions): preserve late tool invariants 2026-08-09 23:51:39 +02:00
Duncan Ogilvie 033c7a725e fix(extensions): preserve restricted tool isolation 2026-08-09 23:39:55 +02:00
Duncan Ogilvie 05f17fa76f fix(extensions): make lifecycle registration atomic 2026-08-09 22:07:46 +02:00
Duncan Ogilvie fe1a615463 fix(extensions): reconcile lifecycle replacements 2026-08-09 21:44:45 +02:00
Duncan Ogilvie f544ddc6f6 fix(extensions): settle failed lifecycle registrations 2026-08-09 21:19:31 +02:00
Duncan Ogilvie 0fd55c3dce fix(extensions): type late MCP deduplication 2026-08-09 16:08:03 +02:00
Duncan Ogilvie 07c7fe0938 fix(extensions): stabilize late MCP collisions 2026-08-09 14:39:32 +02:00
Duncan Ogilvie 1592ca7a1d fix(extensions): preserve late tool activation 2026-08-09 14:13:57 +02:00
Duncan Ogilvie 19b428b757 fix(extensions): register lifecycle tools 2026-08-09 13:44:39 +02:00
can1357 68dece477f Merge PR #7772: fix(session): handle subscription-cap retry exhaustion (@roboomp) 2026-08-07 13:37:54 +02:00
can1357 35ab3ece48 refactor(secrets): extracted buildSecretObfuscator from sdk session setup
Moved the obfuscator assembly (secrets.yml + env entries + built-in
credential patterns, placeholder-key minting rules, redaction-only
fallback) from createAgentSessionScoped into the secrets module so other
entrypoints can build the same obfuscator.
2026-08-07 05:59:58 +02:00
roboomp f6c5a43a1f fix(session): handled subscription-cap retry exhaustion
- Classified subscription and plan rate caps as credential-rotatable usage limits while preserving transient per-minute throttles.

- Applied reason-specific backoff to transient rate limits and collapsed exhausted retry attempts behind one budget-labeled terminal error.

- Covered classification, delay selection, persisted transcript aggregation, and retry event propagation.

Fixes #7767
2026-08-06 01:31:22 +00:00
Brent db97103c32 fix(coding-agent): complete usage-aware fallback integration 2026-08-03 16:34:35 +00:00
Christian Stewart 302148523f fix(hub): wake owners when supervised processes exit
Publish terminal daemon completions to the session that started the
process so idle agents can resume without polling hub status.

Persist every unacknowledged generation with a stable completion ID and
immutable snapshot. Replay the collection after reconnect or broker
recovery, and clear each event only after the owning client acknowledges
it.

Signed-off-by: Christian Stewart <christian@aperture.us>
2026-08-03 01:31:39 -07:00
can1357 a58584ff3c feat: implemented shared serialization utilities and standardized inventories
- Added shared Python call and literal serialization utilities with multiline verbatim support.
- Standardized tool inventories to format as an OpenAI-Harmony functions namespace using TypeScript declarations.
- Updated tool normalization and rendering functions to accept options objects and default to Python-syntax examples.
- Refactored Gemini dialect rendering to leverage shared serialization functions directly.
2026-08-03 05:06:49 +02:00
can1357 cc2265f681 feat: use simple form replace when replace is the edit mode 2026-08-03 01:00:51 +02:00
can1357 10625d2e9a Merge PR #7376: feat(coding-agent): add OpenAI service tier override (@paralin)
# Conflicts:
#	packages/coding-agent/src/commands/launch.ts
2026-08-02 21:22:41 +02:00
can1357 160bdd05c3 fix(agent): keep session scout notices live 2026-08-02 20:52:57 +02:00
can1357 3de8c3a476 Merge PR #7344: fix(agent): stop leaking scout into prompts when it is disabled (@szavadsky)
# Conflicts:
#	packages/coding-agent/src/prompts/system/system-prompt.md
2026-08-02 20:52:56 +02:00
can1357 92b50faacc feat(coding-agent/lsp): implemented lsp multiplexer server and shared daemon lifecycle
- Added an LSP multiplexer server, protocol definitions, and daemon lifecycle management to route traffic across sessions.
- Introduced `lsp.shared` settings configuration and SDK session creation support for shared language servers.
- Migrated shared daemon ensure helpers into a central launch module with updated import references.
- Added comprehensive unit tests and fake LSP server fixtures covering muxing, sharing, caching, and restarts.
2026-08-02 18:15:22 +02:00
Christian Stewart 9d69db481a feat(coding-agent): add OpenAI service tier override
The OpenAI service tier could only be chosen through the `tier.openai`
setting, or for a resumed session through whatever tier that session
recorded. Wanting flex or priority for a single run meant editing
settings and putting them back afterwards, while `bench` already took a
`--service-tier` flag that the session CLI did not offer.

Add `--service-tier` to the root command. The flag wins over the
configured setting and over a resumed session's recorded tier, leaves
the Anthropic and Google entries untouched, and records the resulting
map so a later resume keeps it. `none` removes the OpenAI entry, which
omits `service_tier` from the request.

Signed-off-by: Christian Stewart <christian@aperture.us>
2026-08-02 05:07:33 -07:00
Slava Zavadsky 9885ee34fc fix(agent): stop leaking scout into prompts when it is disabled
Hard-coded 'scout' references reached the model even when the scout
agent was disabled via task.disabledAgents or absent from the session
spawn list. Gate every such reference on scout actually being spawnable:
the task tool description, the delegation gates, the plan-mode and
workflowz notices, the glob/grep/ast-grep guidance, and the task
specialization advisory. Prompt shape is otherwise unchanged; only
erroneous references to the unavailable subagent are dropped.

Closes #7313
2026-08-01 23:50:33 -04:00
can1357 03e54555f9 Merge PR #7065: fix(xdg): fix files and folder for xdg-maintained (@Parsifa1) 2026-08-01 20:39:29 +02:00
can1357 386385f18b fix(coding-agent): skipped xd:// mounting when write tool is not granted
- Prevent xdev state allocation and tool mounting in sessions lacking a write tool.
- Expose discoverable tools top-level instead of auto-granting write transports.
2026-08-01 20:39:08 +02:00
can1357 cc884eea9b Merge PR #7252: fix(coding-agent): keep hub-killed subagent from resurrecting as parked (@roboomp) 2026-08-01 20:14:40 +02:00
can1357 237aa46faf fix(coding-agent): refreshed repo context after cwd changes 2026-08-01 20:13:38 +02:00
can1357 93a9f0d991 Merge PR #7262: fix(coding-agent): refresh context files on plugin reload (@roboomp) 2026-08-01 20:13:38 +02:00
Sunil Srivatsa f22c0edbfa fix(coding-agent): scope SDK extension packages 2026-08-01 13:50:53 -04:00
Sunil Srivatsa 8a7edb3f3d fix(coding-agent): preserve explicit extensions in isolation 2026-08-01 12:32:19 -04:00
roboomp 55115f4bfd fix(coding-agent): refresh advisor context prompt on reload
Rebuilt advisor runtimes with the rediscovered context files so advisor turns stop evaluating against stale AGENTS.md instructions after /reload-plugins.

Fixes #7258
2026-08-01 11:46:55 +00:00
roboomp 08c80f7da0 fix(coding-agent): scope context rediscovery to session settings
Threaded the session's disabledExtensions into context-file rediscovery so a concurrently-created session's global settings cannot toggle another session's context entries.

Fixes #7258
2026-08-01 11:36:34 +00:00
roboomp 2b268b4d2c fix(coding-agent): refreshed context files on plugin reload
Rediscovered context files from the active session cwd whenever plugin prompt sources refresh, while preserving explicitly preloaded SDK context.

Covered edited and disabled context files in the current system prompt.

Fixes #7258
2026-08-01 11:27:03 +00:00
roboomp 57732e9dcd fix(coding-agent): detach hard-aborted refs so ensureLive can't route into a dead session
Preserving aborted refs on dispose exposed a latent invariant break: the
executor's hard-abort path (finalizeSubagentLifecycle) set status `aborted`
and disposed the session without detaching it. With the ref now retained, it
kept a dangling pointer to the disposed session, and ensureLive returns any
non-null ref.session before its revivability check — so hub focus / transcript
chat could route into a dead session.

- finalizeSubagentLifecycle: detach the session before disposing on the
  terminal hard-abort path, upholding the AgentRef invariant (session === null
  when aborted).
- release(tombstone): detach before dispose too (capture the live session
  first), same invariant.
- unregisterUnlessParked: preserve `aborted` refs only when already detached;
  an aborted ref still holding a live session is a bug and is unregistered
  rather than kept reachable.
- Regression test now asserts ensureLive rejects a tombstoned id as terminal.

Fixes #7250
2026-08-01 09:42:41 +00:00
roboomp d350dd8f84 fix(coding-agent): preserve aborted tombstone across live-session dispose
A live-session hub kill did not stick: release(tombstone) awaited the
wrapped session dispose first, and createAgentSession's unregisterUnlessParked
removed any non-parked ref, so the subsequent detach/setStatus no-oped and the
ref was gone — leaving the reopen resurrection for idle/running agents.

- release(tombstone) now marks the ref `aborted` BEFORE disposing, so the
  dispose guard preserves it; the session is detached afterward.
- unregisterUnlessParked now also spares terminal `aborted` refs (matching
  the documented "hard-killed, terminal" retention and finalizeSubagentLifecycle).
- Regression test now uses a session stub that mirrors the real wrapped
  dispose (unregister unless parked/aborted), so it fails if the tombstone is
  set after dispose.

Fixes #7250
2026-08-01 09:34:43 +00:00