- Extended GitHub URL parsing to recognize commit paths and extract commit refs.
- Implemented a commit renderer that fetches commit metadata, stats, and file patches from the GitHub API.
- Added a handler branch to render commit URLs to markdown with `github-commit` results metadata.
- Added a generation-aware early-exit check in `#waitForPostPromptRecovery` to return when the prompt turn is superseded.
- Passed the current prompt generation into the post-prompt recovery wait after prompting.
- Ensured aborted prompts no longer block while later queued retry/follow-up turns drain.
- Updated JS eval helper option parsing to accept positional optional args or a trailing plain-object options argument, while rejecting mixed or invalid forms.
- Updated `read` to route non-`local://` URI paths through the `read` tool with line selectors so offset/limit slicing works for artifact-style resources.
- Expanded JS executor tests for positional reads, nullable slot skipping, and delegated URI read slicing.
- Removed the `task` embedded agent's explicit `thinkingLevel` assignment.
- Updated the `quick_task` agent to use `Effort.Medium` instead of `Effort.Minimal`.
- Updated OpenAI context promotion linking to resolve target models by parsed version and provider/API match instead of fixed bare ids.
- Scanned available siblings to select the plainest matching gpt-5.4 fallback so namespaced, dotted, and dated 5.5 variants promote correctly.
- Adjusted the TUI render stress shadow writer to ignore alternate-screen regions and replay only normal-screen bytes after exits.
- Added 8on22-bw and 11on16-bw variants with spacing-tuned defaults for snapcompact.
- Changed provider defaults/mappings to use 11on16-bw for Anthropic and 8on22-bw for OpenAI/Google.
- Updated model frame rules so claude/fable/opus and gemini/gpt families map to new shapes and 2048 billing behavior.
- Fixed non-multiplexer resize dragging by using alternate screen during transient resize frames.
Grill test-gap finding: the learned-lesson read-back had no coverage for the
budget clamp when a memory summary already fills `summaryInjectionTokenLimit`.
Add a case with an oversized summary asserting the lesson is dropped and the
combined block stays bounded.
Grill findings on the auto-learn change-set — the controller nudge, the standing
guidance, and the actual tool availability could disagree:
- Guidance was rebuilt from live `autolearn.enabled`, so a mid-session enable (or
a subagent that filtered the tools out) injected guidance for tools the session
never built. `buildAutoLearnInstructions` now takes `{ manageSkill, learn }` and
is driven by the auto-learn BUILTINS that `createTools` actually built
(`builtInToolNames`) — provenance, so a same-named custom/extension tool can't
trigger it while auto-learn is off.
- The controller install reverted to gate on `autolearn.enabled && taskDepth === 0`:
the tool registry is built once at session start, so installing it while disabled
would nudge toward absent tools. The fire-time re-check still handles a
mid-session disable.
- Force-included auto-learn tools are now ACTIVATED for restricted top-level
sessions (mirroring the `yield` invariant), so a session with an explicit tool
whitelist actually exposes manage_skill/learn instead of building them inactive.
Tests: guidance gating by tool presence (none/manage-only/learn), restricted-session
activation via createAgentSession, and removal of the obsolete mid-session-enable
controller case.
Grill findings on the auto-learn change-set:
- Reject a symlinked managed-skills ROOT (not just the per-skill dir): lstat on a
child follows intermediate components, so a symlinked root would let an
otherwise-valid name write/delete outside the isolated directory. Added
`assertManagedRootSafe()` to create, update, and delete.
- Reject empty content: an all-whitespace/control description sanitizes to "" and
the `requireDescription` discovery scan then silently drops the skill, so the
tool would report success for a skill that never appears. Reject empty
description/body before writing.
- Serialize create/update/delete on the same skill name (`serializeSkillMutation`):
both tools are non-exclusive, so a parallel batch could interleave (e.g. update
observing the file mid-delete). O_EXCL only covered duplicate-create.
Tests: symlinked root/dir/file rejection (create + update + delete), empty
description/body, concurrent create+update ordering, concurrent-create one-winner.
- Stopped and cleared the working loader before auto-compaction and auto-retry.
- Ensured stale loadingAnimation is removed so agent_start recreates the Working loader.
- Set catalog model input/output costs to 0.09/0.18 and reduced maxTokens to 65536.
- learn (mnemopi): `rememberScoped` returns undefined when the retain failed
(closed DB / disk error). The tool ignored it and reported "Lesson stored"
(and could still mint a skill), silently losing the lesson. Mirror
`mnemopiBackend.save` and fail loudly when no id is returned.
- manage_skill: enforce the action/field contract in the schema via a cross-field
refine (create/update require description+body; delete needs only name) instead
of relying solely on a runtime throw in execute. Kept as a refine, not a
discriminated union, so the wire schema stays a single root object — both
strict structured-output mode and the Anthropic tool-schema builder require
that.
Addresses review threads on PR #2542 (threads 19, 14).
`truncateByApproxTokens` appends a truncation marker, so a truncated memory
summary can exceed `limit * 4` chars and drive the remaining lessons budget
negative. Clamp to 0 and skip lessons entirely when the summary already fills the
budget, instead of feeding a negative limit to the truncator.
Addresses review thread on PR #2542 (thread 15).
The managed-skill discovery block vetoes a name already in `skillMap` to let a
custom-directory authored skill win. Custom dirs never enter `result.all`, so
they are absent from `enabledAuthoredNames` — the map check is the only veto, and
it only works because the custom-dir loop runs first. Add a comment so a future
refactor doesn't invert the order.
Addresses review thread on PR #2542 (thread 7).
`writeManagedSkill` resolved create-vs-update with a check-then-write, so two
concurrent creates for the same name could both pass the existence check and the
second would stomp the first. Create now uses an `O_CREAT|O_EXCL` ("wx") write
that fails atomically if the file exists (closing the race) and refuses to
follow a symlinked `SKILL.md`. Update keeps the lstat existence + symlink guard.
Addresses review thread on PR #2542 (thread 6).
The controller was only constructed when `autolearn.enabled` was true at
`createAgentSession` time. Because `newSession` reuses the session without
rerunning startup, enabling the setting via the UI mid-session never installed
the listener, so the feature stayed inert until the app was recreated. The
controller already re-checks the live flag at fire time, so install it for every
top-level session and let that check gate activation; when disabled it only
counts tool calls and returns.
Addresses review thread on PR #2542 (thread 18).
Added OpenAI-compatible compat metadata for endpoints that allow tools but reject forced tool_choice. OpenCode Go kimi-k2.7-code now downgrades resolve-gate forcing to auto tool selection while preserving thinking-mode request state.\n\nFixes #2546
Two controller bugs from review:
- The post-stop nudge still queued a passive `nextTurn` message during goal
mode (goal mode only disabled `autoContinue`). That message rides the goal
continuation and can divert the goal loop into capture. Return early when
goal mode is active.
- `#suppressNext` was latched before the fire-and-forget `sendCustomMessage`.
It must arm synchronously (the synthetic turn's `agent_end` fires inside
`sendCustomMessage` before it resolves), but a rejected or *deferred* dispatch
(ACP clients downgrade `triggerTurn` to a queue) then produces no `agent_end`,
so the latch swallowed the next real stop. `sendCustomMessage` now returns
whether it actually started a turn; the controller disarms the latch when no
turn ran (rejection or deferral).
`task/executor.ts` widens its pending-message array to `Promise<unknown>[]` to
absorb the new return type (the resolved values are discarded).
Addresses review threads on PR #2542 (threads 5, 9, 12).
The `AutoLearnController` was constructed inside the fire-and-forget
`startMemoryStartupTask`, after `await memoryBackend.start()`. With a slow
backend (Mnemopi/Hindsight) a fast first turn could begin and finish before the
event listener subscribed, dropping that turn's tool events so no nudge fired.
Install the controller synchronously, before the backend task, so the listener
is registered before any turn can run.
Addresses review thread on PR #2542 (thread 10).
`writeManagedSkill` wrote `<managed-dir>/<name>/SKILL.md` via `Bun.write`,
which follows symlinks. A planted symlink at the `<name>` directory (or the
`SKILL.md` itself) could redirect the write outside the isolated managed root
and clobber a user-authored skill, breaking the isolation guarantee. lstat the
parent directory and the file and reject symlinks before writing; the existence
check now derives from the same lstat instead of a separate `Bun.file().exists()`.
Addresses review thread on PR #2542 (thread 11).
The `manage_skill`/`learn` force-include and `isToolAllowed` gates only
checked `autolearn.enabled`, not session depth. A subagent created with an
explicit `tools:[...]` whitelist (which runs `approvalMode: "yolo"`) would
silently gain write-capable tools that can mutate `~/.omp/agent/managed-skills`.
The auto-learn controller only runs for top-level sessions, so gate both the
force-include and `isToolAllowed` for `manage_skill`/`learn` to `taskDepth === 0`.
Also tidies the gating test file: drop a module-level `Bun.env` mutation that
was never restored (the test runner skips the Python preflight already) and a
no-op `afterEach` homedir spy in a block that never mocks homedir. Adds a
subagent-exclusion test.
Addresses review threads on PR #2542 (threads 2, 3, 8, 16).
- Updated the resize fast-path repaint to remove the terminal full-screen clear and instead overwrite the viewport in place at home, rewriting each row via `#lineRewriteSequence`.
- Passed the viewport width into `#emitResizeViewport` so each row self-clears only its tail with CSI K while resize drag remains active.
- Added coverage in `resize-viewport-defer.test.ts` confirming drag-time writes omit ED2/ED3 clears and that ED3 is emitted when the resize settles.
- Added `paste.largeMenuThreshold` setting with default 100 and values 0/100/250/500/1000.
- Added `Editor.onLargePaste` and `Editor.insertPaste` to intercept oversized pastes and expand markers.
- Added threshold-based large-paste routing to show the menu and wrap oversized content for code/XML or attachment fallback.
- Added tests for large-paste interception, fallback behavior, short-paste handling, and marker expansion.
- Added a smart poll-wait mode to AsyncJobManager with per-owner escalation ladder logic and a reset timer for idle pauses.
- Updated job polling to use the adaptive wait when `async.pollWaitDuration` is `smart` and to record poll completion timing for subsequent waits.
- Expanded async job settings and tests so `smart` is the default option and escalation, reset, and owner isolation behavior are covered.
- Added an `isEmpty` getter on `AgentHubOverlayComponent` to report whether no subagent rows were loaded.
- Extended `showAgentHub` with an optional `requireContent` flag so the overlay is disposed early when empty under the double-<- path.
- Added tests for double-<- gating behavior with no subagents, with subagents, and explicit hub-open behavior.
The `learn` tool previously required a `hindsight`/`mnemopi` backend. It now
also works when `memory.backend` is `local` (the file-based rollout backend):
lessons append to a `learned.md` under the project's memory root, kept separate
from the consolidation artifacts so a consolidation pass never clobbers them,
and are injected into future sessions alongside the memory summary.
- memories: `saveLearnedLesson` (newest-first, deduped, count- and per-field
size-capped, secret-redacted, injection-neutralized) with per-path write
serialization; `buildMemoryToolDeveloperInstructions` reads `learned.md` and
shares one injection budget with the summary; `redactSecrets` extended with
GitHub/npm/Slack/Google token prefixes.
- local backend: implements `save()`; status reports `writable: true`.
- learn tool: `local` execute branch; `createIf`/`isToolAllowed`/auto-include
and the standing guidance extended to `local`; local saves tier as a `write`
approval.
- read-path prompt: renders the learned-lessons block when present.
- Lessons are injection-neutralized and secret-redacted on BOTH write and read
(they render unescaped into the system prompt).
Also moves the auto-learn CHANGELOG entry out of the released [15.12.6] section
(a cherry-pick artifact) back under [Unreleased] and notes the local backend.
Tests: local storage (format, dedup, cap, redaction incl. provider/delimiter-
split tokens, concurrency), read-back (with/without summary, off-gating, raw
hand-edited file), tool gating + write-approval tiering.
- Moved the ctrl+p model-role cycle rendering from `showStatus` to a dedicated anchored cycle container above the editor.
- Updated InteractiveMode to rebuild the cycle container in place and auto-clear the track after 4 seconds.
- Added tests that validate no scrollback stacking, in-place replacement, and timer-based clearing behavior.
- Routed `customType: "handoff"` messages to the compact divider path in Agent Hub and UI helpers.
- Added handoff summary expansion that extracts context text and strips `<handoff-context>` wrappers.
- Refactored shared divider rendering into `SummaryDividerComponent` used by compaction and handoff messages.
- Added a `snapcompact-savings.jsonl` append-only journal for per-tool savings records.
- Extended `SnapcompactInlineTransformer` to compute `savedTokens` and emit savings to an optional sink.
- Integrated `createSnapcompactSavingsRecorder` into `createAgentSession` for session-aware tool-result metrics.
- Skipped journaling entries without a session and deduped duplicate `toolCallId`s per recorder lifecycle.
- Added tests for savings-sink emissions and savings-journal read/write behavior.
- Hardened left-arrow double-tap handling with a new detector that only fires on a second tap in a 40--500ms window.
- Reused that detector for both Agent Hub opening and focused-subagent return so terminal-synthesized burst taps no longer trigger navigation.
- Added gesture tests for deliberate doubles, burst suppression, minimum-gap filtering, and focused-subagent unfocus behavior.
Add a default-off "auto-learn" loop. When `autolearn.enabled` is set, after the
agent stops a session controller nudges it to capture reusable lessons: durable
facts go to long-term memory and repeatable procedures become "managed skills" —
SKILL.md files written to an isolated ~/.omp/agent/managed-skills directory that is
discovered and surfaced like authored skills but never overwrites them.
Two tools back this:
- `manage_skill` — create/update/delete managed skills.
- `learn` — record a lesson, optionally minting/enhancing a managed skill in the
same call (requires a hindsight/mnemopi memory backend).
The nudge is passive by default (a hidden reminder rides the next turn);
`autolearn.autoContinue` instead auto-runs one capture turn at stop, and
`autolearn.minToolCalls` (default 5) gates trivial turns. Plan/goal-mode turns and
subagents are never nudged, and the controller re-checks the live setting at fire
time so a mid-session opt-out takes effect.
Isolation & precedence: managed skills are a separate lowest-priority discovery
provider, so an authored skill of the same name wins across every provider and
custom directory regardless of third-party toggles; a disabled higher-priority
authored skill can never hide a managed one, and managed never masks an enabled
authored skill. Managed names and descriptions are sanitized on both write and
read (control/format chars, angle brackets, and Markdown fences) before they render
into the system prompt, and the SKILL.md byte cap is enforced on the final
serialized file.
Default off → zero footprint when disabled.