Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Merge batch 11-06 k1015: #3311 (#3314)

0xken159ec8d9ef4d89
diff --git a/cli/src/superTabs/terminal.spec.ts b/cli/src/superTabs/terminal.spec.ts
index bcba553cd..2add33c98 100644
--- a/cli/src/superTabs/terminal.spec.ts
+++ b/cli/src/superTabs/terminal.spec.ts
@@ -584,6 +584,21 @@ describe('reading a usage limit off a screen', () => {
])('reads no limit off %s: %s', name => {
expect(limitOf(fixture(name), now)).toBeNull()
})
+ it.each([
+ '⏺ harness - read_screen (MCP)(harnessId: "h1")',
+ '⏺ my.server-1 - read_screen.v2 (MCP)(harnessId: "h1")',
+ ])('reads no limit off an MCP reply: %s', header => {
+ expect(limitOf(`${header}\n ⎿ ■ You've hit your usage limit. Try again at 4:08 PM.\n\n❯ `, now)).toBeNull()
+ })
+ it('still reads its own notice after MCP output or a reply with parentheses', () => {
+ for (const before of [
+ '⏺ harness - read_screen (MCP)(harnessId: "h1")\n ⎿ Screen read.\n',
+ '⏺ Checked the agent (it is working).',
+ ]) {
+ expect(limitOf(`${before}\n ⎿ You've hit your session limit · resets 3pm\n\n❯ `, now))
+ .toEqual({ resetAt: new Date(2026, 9, 23, 15, 0).toISOString() })
+ }
+ })
it('reads no limit off a log a tool printed, quoted or indented, near the prompt', () => {
expect(limitOf('⏺ Read(logs/codex.log)\n ⎿ Read 3 lines\n 5-hour limit reached ∙ resets 3pm\n\n❯ ', now)).toBeNull()
expect(limitOf('• Ran cat codex.log\n └ ■ You\'ve hit your usage limit. Try again at 4:05 PM.\n\n› ', now)).toBeNull()
diff --git a/cli/src/superTabs/terminal.ts b/cli/src/superTabs/terminal.ts
index 9f97a9da3..826319bd7 100644
--- a/cli/src/superTabs/terminal.ts
+++ b/cli/src/superTabs/terminal.ts
@@ -114,8 +114,9 @@ export function signedOut(text: string): boolean {
/** A model the agent gets no answer from: retrying one that does not answer, or signed out of it. */
const unanswered = (text: string) => modelFailing(text) || signedOut(text)
-/** Claude Code's tool call, whose output it draws under it: "⏺ Bash(…)", "⏺ Read(…)", "⏺ mcp__github__get_pr(…)". */
-const TOOL_CALL = /^⏺\s+[\w.-]+\(/
+/** Claude Code draws tool output under its call: "⏺ Bash(…)", "⏺ Read(…)", "⏺ mcp__github__get_pr(…)" or
+ * "⏺ github - get_pr (MCP)(…)". The spaced MCP header must count too, or a printed limit becomes the engine's own. */
+const TOOL_CALL = /^⏺\s+[\w.-]+(?: - [\w.-]+ \(MCP\))?\(/
/** Whether line [at] of [lines] is where an engine draws its own notice, not text the agent printed (Ken, 11-03: River
* was listed limited while working, as it had just printed another agent's screen showing Codex's limit line). An engine