Commit Graph

6172 Commits

Author SHA1 Message Date
ZeyuFu e25f3ca736 fix(tmux-subagent): drain terminal probe replies during delegated pane startup (#2887)
When oh-my-opencode created a delegated tmux pane, terminal
capability/color probe replies emitted by tmux or the freshly
attaching opencode session could end up in the caller pane's
input buffer instead of being consumed by the delegated pane,
appearing as literal text in the main OpenCode chat (e.g.
"414/21212a2/...").

Root cause: buildSplitArgs in team-layout-tmux/layout.ts called
split-window without the -d (detached/don't-switch-focus) flag.
Without -d, tmux briefly grants focus to the new pane during
creation; the outer terminal then sends DA1/DA2 and OSC color
probe replies into what it believes is the active pane, but the
focus handoff races and those bytes land in the caller pane's
stdin buffer instead.

Fix: add -d to every split-window call in buildSplitArgs, matching
the same flag already used in pane-spawn.ts for inline subagent
panes. This keeps the caller pane focused throughout the delegated
pane lifecycle so probe replies are consumed by the correct target.

Existing tests pass; one new test asserts -d is present on every
split-window call to guard this invariant.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 01:41:25 -04:00
YeonGyu-Kim 1723a8b74c Merge pull request #3500 from Disaster-Terminator/fix/tmux-defer-attach-until-focus 2026-05-16 00:36:07 +09:00
YeonGyu-Kim e63c5b9a22 fix(tmux): require explicit active isolated window 2026-05-16 00:26:44 +09:00
YeonGyu-Kim 1ff59f44ce test(tmux): align pane-state runner format 2026-05-16 00:22:52 +09:00
YeonGyu-Kim d02cca4422 test(tmux): align pane replace placeholder expectations 2026-05-16 00:18:33 +09:00
YeonGyu-Kim 54a7256a71 test(tmux): align placeholder command expectations 2026-05-16 00:14:06 +09:00
Disaster-Terminator 91f1cf5fbc fix(tmux): pin pane commands to /bin/sh 2026-05-16 00:08:51 +09:00
Disaster-Terminator 8c5ca73634 fix(tmux): sweep suffixed stale isolated sessions 2026-05-16 00:07:57 +09:00
Disaster-Terminator 0c8e546c57 fix(tmux): support manager-scoped isolated session names 2026-05-16 00:06:58 +09:00
Disaster-Terminator 4e3684eb2a fix(tmux): gate isolated pane activation on visible client focus 2026-05-16 00:05:02 +09:00
Disaster-Terminator c63108d55b fix(tmux): track placeholder panes before attach readiness 2026-05-16 00:02:02 +09:00
Disaster-Terminator 688bb551b2 fix(tmux): defer subagent attach until pane focus 2026-05-15 23:57:07 +09:00
YeonGyu-Kim 6e5a127f88 Merge pull request #3840 from EnochLi15/codex/fix-tool-execute-after-boundary 2026-05-15 23:47:15 +09:00
Enoch d11613999a fix tool execute after hook boundary 2026-05-15 23:37:45 +09:00
YeonGyu-Kim ad10450b5c Merge pull request #3841 from Momentum96/fix/background-manager-tmux-ordering 2026-05-15 23:35:29 +09:00
github-actions[bot] df64f32520 @boris-gorbylev has signed the CLA in code-yeongyu/oh-my-openagent#4057 2026-05-15 14:26:06 +00:00
YeonGyu-Kim be25109f6d fix(continuation): skip internal user turns 2026-05-15 23:16:23 +09:00
YeonGyu-Kim c580b8f2ce fix(session): ignore internal synthetic turns 2026-05-15 23:16:05 +09:00
YeonGyu-Kim e8de8b79a8 fix(team-mode): skip pending mailbox reinjection 2026-05-15 23:15:46 +09:00
Momentum96 e90ff8058e fix(tmux): treat busy sessions as attachable 2026-05-15 23:12:56 +09:00
Momentum96 efb862ce9f fix(tmux): prefer real tmux when session env exists 2026-05-15 23:12:56 +09:00
Momentum96 5238dd484e fix(background-agent): start promptAsync before blocking tmux callback
- Fixes BackgroundManager to launch promptAsync before invoking the blocking tmux callback.
- Adds regression test to ensure promptAsync is called before tmux callback.
2026-05-15 23:11:07 +09:00
YeonGyu-Kim a9a003250c Merge pull request #3497 from Disaster-Terminator/fix/reminder-hooks-preserve-state-across-compaction 2026-05-15 23:08:48 +09:00
YeonGyu-Kim 291b1f7b3c test(reminder-hooks): clean up compaction regressions 2026-05-15 22:59:58 +09:00
YeonGyu-Kim 672f5d6e9b fix(keyword-detector): skip synthetic turns 2026-05-15 22:49:17 +09:00
YeonGyu-Kim 196f6512ae fix(team-mode): defer live mailbox acks 2026-05-15 22:49:10 +09:00
Disaster-Terminator 392c20e53a test(reminder-hooks): make delete reset regression diagnostic 2026-05-15 22:43:32 +09:00
Disaster-Terminator 29e7e97d8f test(reminder-hooks): cover delegated sessions across compaction 2026-05-15 22:42:49 +09:00
Disaster-Terminator 3db1da1e5b fix(reminder-hooks): preserve suppression state across compaction 2026-05-15 22:42:49 +09:00
YeonGyu-Kim ae7ff3bb7e Merge pull request #3891 from wjiuxing/feat/chinese-error-patterns 2026-05-15 22:36:15 +09:00
YeonGyu-Kim 3e9b125fd5 test(runtime-fallback): cover localized provider errors 2026-05-15 22:25:20 +09:00
wjiuxing c206b16865 feat: add Chinese error patterns to model-error-classifier 2026-05-15 22:23:06 +09:00
wjiuxing 149a83d703 feat: add Chinese quota patterns to classifyErrorType 2026-05-15 22:22:21 +09:00
wjiuxing adfa8befbb feat: add Chinese error patterns to RETRYABLE_ERROR_PATTERNS 2026-05-15 22:21:06 +09:00
YeonGyu-Kim e24e495a6b Merge pull request #3322 from RaviTharuma/fix/runtime-fallback-equivalent-skip 2026-05-15 22:17:43 +09:00
Ravi Tharuma d9033d73ae fix(runtime-fallback): keep variant in equivalence
Treat parsed variant as part of runtime-fallback model equivalence so variant-only fallback hops remain distinct while preserving the existing Claude-family alias handling.

Constraint: Oracle verification flagged unresolved PR #3322 review concerns about variant equivalence and remote state
Rejected: Preserve provider identity in equivalence | contradicted the original live-loop fix for equivalent Claude aliases
Confidence: medium
Scope-risk: narrow
Directive: Any future equivalence broadening must prove both live retry-loop behavior and variant/provider semantics with targeted tests before merging
Tested: bun run typecheck
Tested: bun test src/hooks/runtime-fallback/index.test.ts src/hooks/runtime-fallback/error-classifier.test.ts src/plugin/event.model-fallback.test.ts
Not-tested: Full live end-to-end repro across all provider redundancy policies
2026-05-15 22:05:27 +09:00
Ravi Tharuma f501c47c49 fix(runtime-fallback): skip equivalent claude aliases
Prevent runtime fallback from cycling through provider aliases that resolve to the same underlying Claude family model. This keeps retry handling moving toward a genuinely distinct fallback model instead of appearing to fallback while staying on the same effective model.

Constraint: Live retry/fallback bug is in /Users/ravi/Code/personal/oh-my-opencode, while oh-my-openagent contribution work remains isolated to /Users/ravi/Code/forks/oh-my-openagent
Rejected: Change fallback chain precedence (category vs agent) first | lower-confidence root cause than equivalent-model retry
Confidence: high
Scope-risk: narrow
Directive: Keep alias-equivalence logic limited to model families that are intentionally interchangeable for runtime failover, and expand with targeted tests before broadening provider-family collapsing
Tested: bun run typecheck
Tested: bun test src/hooks/runtime-fallback/index.test.ts src/hooks/runtime-fallback/error-classifier.test.ts src/plugin/event.model-fallback.test.ts
Not-tested: Full live end-to-end session repro against external provider outages
2026-05-15 22:05:00 +09:00
YeonGyu-Kim f54888b2fe Merge pull request #3576 from Disaster-Terminator/fix/background-busy-stall-detection 2026-05-15 21:56:31 +09:00
YeonGyu-Kim 27788b4ab0 fix(session-recovery): audit raw prompt aliases 2026-05-15 21:53:05 +09:00
YeonGyu-Kim 4a1c260d8b test(todo-continuation): cover peer-message reservation holds 2026-05-15 21:52:53 +09:00
YeonGyu-Kim 39fef2042b fix(background-agent): resolve parent wake agent aliases 2026-05-15 21:52:40 +09:00
YeonGyu-Kim 2bd4944bad fix(prompt-gate): scope reservation releases 2026-05-15 21:52:29 +09:00
Disaster-Terminator b6caa5d3e0 fix(background-agent): correct stall timeout guidance 2026-05-15 21:44:29 +09:00
Disaster-Terminator 189af23e96 fix(background-agent): detect stalled active sessions 2026-05-15 21:44:29 +09:00
YeonGyu-Kim 2eec0d96d9 Merge pull request #3319 from EZotoff/fix/remove-activity-stagnation-bypass 2026-05-15 21:36:09 +09:00
YeonGyu-Kim 65c1283338 fix(todo-continuation): clean up idle event diagnostics 2026-05-15 21:29:21 +09:00
Evgeny Zotov 047ca069a2 test: rename test to reflect todo-only stagnation check
Address review feedback: test name no longer references 'tool activity'
since activity tracking was removed.
2026-05-15 21:11:08 +09:00
Evgeny Zotov 68e9d54fa5 fix(todo-continuation): remove activity-based stagnation bypass
Activity signals (tool calls like compress, grep, bash) were treated as
'progress' by the stagnation detector, resetting the stagnation counter
every cycle. This prevented MAX_STAGNATION_COUNT from being reached,
causing infinite continuation loops when models degrade to minimal
responses in long sessions (e.g. GLM-5.1 at ~100K tokens).

Stagnation now only tracks actual todo state changes: incomplete count
decrease, completed count increase, or todo snapshot change. Tool-level
activity no longer resets the stagnation counter.
2026-05-15 21:11:08 +09:00
YeonGyu-Kim fe66c96215 Merge pull request #4053 from code-yeongyu/supersede/3866-tool-result-schema
fix(tool-pair-validator,session-recovery): schema-compatible synthetic tool results (supersedes #3866)
2026-05-15 21:04:45 +09:00
rshks b504fb1deb fix(tool-pair-validator): emit schema-compatible synthetic tool results 2026-05-15 21:04:03 +09:00