Commit Graph

6214 Commits

Author SHA1 Message Date
YeonGyu-Kim 30adce9cad fix(prompt-gate): share message reservations 2026-05-15 12:55:56 +09:00
YeonGyu-Kim dd6271bbf4 fix(babysitter): gate reminder prompts 2026-05-15 12:55:56 +09:00
YeonGyu-Kim a524754eca fix(todo-continuation): gate idle prompts 2026-05-15 12:55:56 +09:00
YeonGyu-Kim b0b61182b4 fix(ralph-loop): gate continuation prompts 2026-05-15 12:55:56 +09:00
YeonGyu-Kim 960baf39bb fix(atlas): gate boulder continuation prompts 2026-05-15 12:55:56 +09:00
YeonGyu-Kim b0a484b403 fix(session-recovery): gate resume prompts 2026-05-15 12:55:56 +09:00
YeonGyu-Kim db28a32cff fix(recovery): gate compaction prompts 2026-05-15 12:55:56 +09:00
YeonGyu-Kim c75f548863 fix(fallback): gate model retry prompts 2026-05-15 12:55:56 +09:00
YeonGyu-Kim f1a62a9cd1 fix(team-mode): gate member wake prompts 2026-05-15 12:55:56 +09:00
YeonGyu-Kim 174cbd0fbd fix(background-agent): gate parent wake prompts 2026-05-15 12:55:56 +09:00
YeonGyu-Kim b2fdd728d0 fix(prompt-async): add session idle gate 2026-05-15 12:55:56 +09:00
YeonGyu-Kim 2567415a94 Merge pull request #4033 from code-yeongyu/perf/ci-test-build-time-20260515
perf(ci): shard CI test runner
2026-05-15 12:17:29 +09:00
YeonGyu-Kim e80c2811b1 ci: fail closed on sharded test gate 2026-05-15 12:07:58 +09:00
YeonGyu-Kim 7ae8207acc Merge pull request #4030 from code-yeongyu/fix/promptasync-concurrency-20260515
fix(fallback): dedupe overlapping fallback continuations
2026-05-15 11:53:36 +09:00
YeonGyu-Kim 23dfe7eec2 fix(fallback): skip duplicate fallback re-arms
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 11:45:21 +09:00
YeonGyu-Kim fdd40815ba ci: split test workflow across shards
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 11:41:35 +09:00
YeonGyu-Kim 53de295b21 perf(ci): add sharded test runner phases
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 11:41:35 +09:00
YeonGyu-Kim b7482ea727 test(fallback): type chat output assertions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 11:28:18 +09:00
YeonGyu-Kim 26bb6231b6 fix(fallback): preserve provider-specific fallback retries
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 11:14:26 +09:00
YeonGyu-Kim 005d16dd96 fix(fallback): dedupe providerless fallback errors
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 11:14:26 +09:00
YeonGyu-Kim da339204bb fix(fallback): dedupe overlapping fallback continuations
Guard model fallback continuation dispatch so overlapping message.updated/session.error surfaces issue only one abort+promptAsync cycle for the same failed fallback.

Refs https://github.com/code-yeongyu/oh-my-openagent/issues/4019

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 11:14:26 +09:00
PeterPonyu 17030b9a0d Prevent subagent repair from corrupting background sessions
Guard the tool-pair validator when transformed assistant messages belong to a tracked subagent session, while keeping normal main-session orphaned tool_use repair intact.

Constraint: code-yeongyu/oh-my-openagent#3996 reports background Oracle sessions hanging after synthetic placeholder tool_result insertion.
Rejected: disable tool-pair-validator globally | would regress main-session compaction/orphaned tool_use repair.
Confidence: high
Scope-risk: narrow
Directive: Keep subagent skip coverage and normal repair coverage together when changing tool-pair validation.
Tested: bun test src/hooks/tool-pair-validator/hook.test.ts src/plugin/messages-transform.test.ts
Tested: bun run typecheck
Not-tested: live Oracle background task e2e; no remote push or PR comment performed.
2026-05-14 21:32:48 -04:00
YeonGyu-Kim c6c7a103dd Merge pull request #4015 from code-yeongyu/fix/background-output-bg-id-20260514
fix(background-task): retry transient missing output tasks
2026-05-15 10:01:40 +09:00
YeonGyu-Kim 8f90c1e92a fix(background-task): log missing output retry 2026-05-15 09:56:01 +09:00
github-actions[bot] d03555902e @sandikodev has signed the CLA in code-yeongyu/oh-my-openagent#4029 2026-05-14 21:07:49 +00:00
Sandikodev c76ac27ebd fix(json-error-recovery): add todowrite/todoread to JSON_ERROR_TOOL_EXCLUDE_LIST 2026-05-15 04:02:54 +07:00
github-actions[bot] bd2f10551e @scw1109 has signed the CLA in code-yeongyu/oh-my-openagent#4020 2026-05-14 12:49:01 +00:00
YeonGyu-Kim d8652863a2 Merge remote-tracking branch 'origin/dev' into fix/background-output-bg-id-20260514 2026-05-14 19:11:44 +09:00
YeonGyu-Kim ca178f411c Merge pull request #4016 from code-yeongyu/fix-bg-noti-coalesce
fix(background-agent): coalesce rapid-fire idle parent notifications
2026-05-14 19:02:10 +09:00
YeonGyu-Kim 9b279d2f00 chore(deps): sync lockfile metadata
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-14 18:58:00 +09:00
YeonGyu-Kim 8ea1e0fd6a chore: sync bun.lock with v4.1.2 release
Bun's --frozen-lockfile failed on origin/dev because v4.1.2 (c75deee54)
bumped the platform binary versions in package.json without refreshing
bun.lock. Regenerated via `bun install` to unblock CI on dev-based PRs.

Required for `bun install --frozen-lockfile` (used by ci.yml test +
typecheck jobs) to succeed.
2026-05-14 18:55:52 +09:00
YeonGyu-Kim 268c89c945 fix(background-agent): coalesce rapid-fire idle parent notifications
When many background tasks complete in rapid succession while the parent
session is idle, each completion fired its own promptAsync call, stacking
N consecutive `<system-reminder>` user messages with no assistant turn
between. Hyperplan + many parallel explore subagents made this very
visible to the user.

Route the idle-path through the existing pendingParentWakes queue with a
100ms debounce window. Notifications arriving during the debounce join
the same batch, the 150ms settle window also coalesces newcomers, and a
single batched prompt fires to the parent. Busy-path semantics are
unchanged (still 1s retry).

Prior attempts (1c05c60dc, ea55c385b, a337635e3) all coalesced only the
busy-defer path, leaving the idle-immediate-send path uncoalesced.
2026-05-14 18:52:28 +09:00
YeonGyu-Kim 1ea192b3f4 fix(background-task): retry transient missing output tasks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-14 18:51:38 +09:00
YeonGyu-Kim b9beea1039 feat(team-mode): drive immediate teardown and recreate-to-reshape loop
Reframe the skill's Lifecycle section so the lead treats teams as
ephemeral, one-per-phase units. The moment a phase ends or the shape
no longer fits, call team_delete and spawn a fresh team. Restructure
through delete-then-create, never in place.

Also fixes a misframing in old step 5: team_shutdown_request is a
per-session self-shutdown signal, not a 'wind down the team' command.
team_delete is what tears the whole team down.
2026-05-14 18:22:30 +09:00
github-actions[bot] c75deee54c release: v4.1.2 2026-05-14 06:38:21 +00:00
YeonGyu-Kim 9a1f8f679f fix(web): route installation links to docs section 2026-05-14 14:18:13 +09:00
YeonGyu-Kim 63ced1d2a0 Merge pull request #4010 from code-yeongyu/chore/safe-tooling-upgrades-biome-tsgo-20260514-132516
chore(tooling): refresh safe deps and checks
2026-05-14 13:57:31 +09:00
YeonGyu-Kim 96d7249581 Merge pull request #4009 from code-yeongyu/fix/ralph-loop-compaction-race
fix(ralph-loop): guard compaction continuation ownership
2026-05-14 13:50:09 +09:00
YeonGyu-Kim f10251b59d chore(tooling): refresh safe deps and checks 2026-05-14 13:46:11 +09:00
YeonGyu-Kim 9e6185266d fix(ralph-loop): guard compaction continuation ownership 2026-05-14 13:43:47 +09:00
github-actions[bot] 72bac14a11 @clousky2020 has signed the CLA in code-yeongyu/oh-my-openagent#4005 2026-05-14 04:42:37 +00:00
YeonGyu-Kim d16d47a0b4 docs: complete v4.1.1 drift sweep in reference and guide docs
Follow-up pass to catch drift my earlier docs commit missed:

docs/reference/features.md:
- 'Architecture Snapshot': 5-tier hook composition '52 base / 59 with team mode'
  to '54 base / 61 with team mode' (matches actual ToolGuard +2 from
  fsync-skip-warning + bash-file-read-guard).

docs/reference/cli.md:
- Add 'boulder' subcommand to Commands table (inspects boulder work-state).

docs/reference/configuration.md:
- Code comment example 'Kimi K2.5 work best' to 'Kimi K2.6 work best' to match
  current primary Sisyphus fallback chain.

docs/guide/installation.md:
- Add 'Kimi K2.6 (opencode-go, vercel)' row to the provider availability table
  above the existing K2.5 row.
- Selection priority footnote and 'Safe Overrides' chains updated to mention
  K2.6 alongside K2.5 in Sisyphus and Atlas chains.

docs/guide/agent-model-matching.md:
- Provider table 'Kimi K2.5' row to 'Kimi K2.6 / K2.5'.
- Atlas fallback chain mentions K2.6 instead of K2.5 alone.
2026-05-14 13:05:15 +09:00
YeonGyu-Kim 98242ba64f docs(i18n+web): align translated READMEs and landing copy with v4.1.1 hook count
Sweep the same '25+ hooks' / '50+ hooks' drift that lingered in the localized
READMEs and the marketing site after the user-facing docs refresh:

- README.ja.md / README.ko.md / README.zh-cn.md / README.ru.md:
  '25+ built-in hooks' to '54+ lifecycle hooks (61 with Team Mode)'.

- web/app/layout.tsx + web/app/_components/landing-page.tsx:
  SEO description, OG description, Twitter description, JSON-LD description,
  and HeroStats injected count: '50+ lifecycle hooks' to '54+ lifecycle hooks'.

Matches the canonical hook composition in src/plugin/hooks/ (24 Session +
16 ToolGuard + 5 Transform + 7 Continuation + 2 Skill = 54 base; +7 with
team_mode.enabled = 61 total).
2026-05-14 13:00:52 +09:00
YeonGyu-Kim 8cc3c32099 docs: refresh user-facing docs to match v4.1.1 codebase
Align README.md, CONTRIBUTING.md, and docs/ with the same ground truth used
in the hierarchical AGENTS.md regeneration commit 1e7a7600a:

- README.md: '25+ built-in hooks' was undercounted by ~30 hooks; now reads
  '54+ lifecycle hooks (61 with Team Mode)' to match actual tier composition.
- CONTRIBUTING.md: src/hooks/ '52 hooks across 55 modules' -> '54 base (61 team) across 58 dirs';
  src/tools/ '26 tools across 16 directories' -> '20-39 tools (config-gated)';
  src/features/ '19 feature modules' -> '20 feature modules' (boulder-state, team-mode added).
- docs/reference/features.md: Core-agent order indices were off-by-one;
  Sisyphus 1/Hephaestus 2/Prometheus 3/Atlas 4 -> 0/1/2/3 (matches installAgentSortShim).
- docs/guide/overview.md: Sisyphus model recommendations now mention Kimi K2.6 alongside K2.5
  since K2.6 is the active default fallback in the primary Sisyphus chain
  (see src/shared/model-requirements.ts).
2026-05-14 12:59:01 +09:00
YeonGyu-Kim 1e7a7600a2 docs(agents-md): regenerate hierarchical AGENTS.md knowledge base for v4.1.1
Refresh all AGENTS.md files to reflect codebase state at 5ffbe0e24 (was cd31d2a1a, 197 commits behind).

Key drift corrections across 45 modified + 1 new file:

Root AGENTS.md:
- TS file counts: 1967 -> 2034 in src/ (1337 source + 697 test)
- LOC: 278k -> 292k
- Barrel index.ts: 120 -> 122
- Hook tier composition: 52/59 -> 54/61 (base/with team-mode)
- Tool Guard hooks: 14 -> 16 (add fsync-skip-warning, bash-file-read-guard)
- Add boulder feature, agent-ordering schema, .agents/ directory, v4.1.1 release tag
- Add generated/ directory entry

src/AGENTS.md:
- Subsystem inventory: agents 96->102, hooks 570->581, tools 306->314,
  features 389->400, shared 258->278, cli 150->158, plugin 55->56
- LOC totals refreshed for every subsystem
- Schema files: 32 -> 30

src/hooks/AGENTS.md:
- Tier 2 (Tool Guard): 14 -> 16 hooks, add fsyncSkipWarning row
- Total: 52 base / 59 team-mode -> 54 base / 61 team-mode
- zauc-mocks count: 7 -> 5

src/features/AGENTS.md:
- background-agent: 47 -> 57 files, mention archive fallback
- opencode-skill-loader: 33 -> 30
- tmux-subagent: 34 -> 32

src/plugin/AGENTS.md:
- Tool Guard composer count: 14 -> 16
- Aggregator total: 43 -> 45

src/cli/AGENTS.md:
- Add new boulder subcommand (BoulderState inspector)
- Command count: 6 -> 7

NEW: src/features/boulder-state/AGENTS.md
- Document the new Boulder work tracking feature
- Schema v2 with BoulderState/BoulderWorkState/TaskSessionState
- Lifecycle, storage, integration points with atlas/ralph-loop hooks

All other AGENTS.md files: Generated date 2026-05-08 -> 2026-05-14.
2026-05-14 12:57:46 +09:00
PeterPonyu 5b99a87c6a fix(runtime-fallback): preserve attemptCount when our own abort is the cause (closes #4006)
When runtime-fallback aborts an in-flight request to swap in a fallback
model, opencode emits session.error{isAbort:true} as a consequence. The
existing event handler treated that as a user cancellation and called
resetRetryState — wiping attemptCount. Every subsequent provider
auto-retry signal then started over at attempt:1, never reaching
max_fallback_attempts, producing an infinite retry loop firing a new
fallback every ~2 seconds.

The bug only surfaces when the configured fallback target itself
silently fails (e.g. github-copilot quota exhausted): the original
model keeps re-emitting retry signals, our handler keeps "fixing"
them, the counter never advances. Reproducible on upstream/dev HEAD
(5ffbe0e24e).

Fix:
- New `internallyAbortedSessions: Set<string>` on HookDeps tracks
  sessions whose abort we triggered ourselves.
- abortSessionRequest in auto-retry.ts adds the session to the set
  when called with one of our internal sources:
  "session.status.retry-signal", "message.updated.retry-signal",
  "session.timeout". The "session.stop" source (user-initiated) is
  intentionally NOT marked — that path must still wipe state.
- handleSessionError in event-handler.ts checks the set before the
  cancellation branch. If the session is marked, consume the flag
  (delete it so a later user-abort still gets the reset) and skip
  resetRetryState. The state's attemptCount is preserved, so the
  next iteration progresses 1→2→3→... until max_fallback_attempts.
- dispose() clears the new set alongside the other per-session maps.

Tests: 3 new event-handler integration tests cover the fix
(internal-abort preserves state, external-abort still resets,
consecutive internal-abort cycles advance attemptCount). Existing
tests pass: 7/7 on event-handler. Pre-existing 2 dispose-test flakes
on the full runtime-fallback suite were verified to exist on
upstream/dev without this patch — unrelated.

bun run build: pass. bun run typecheck: pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 23:55:52 -04:00
YeonGyu-Kim 5ffbe0e24e fix(fallback): guard duplicate prompt injections 2026-05-14 01:03:19 +09:00
YeonGyu-Kim ea55c385bb fix(background-agent): defer busy parent notifications 2026-05-14 00:45:36 +09:00
github-actions[bot] 6e841773b6 @PeterPonyu has signed the CLA in code-yeongyu/oh-my-openagent#3871 2026-05-13 15:40:55 +00:00
YeonGyu-Kim f9b95f9e3e Merge pull request #3993 from code-yeongyu/fix/non-interactive-env-windows-shell
fix(non-interactive-env): respect Windows command shell
2026-05-13 23:45:23 +09:00