Skip to content

Agent status reliability: interrupt fix + lifecycle states - #8365

Open
AsifAd wants to merge 29 commits into
manaflow-ai:mainfrom
AsifAd:feat/agent-status-lifecycle
Open

AsifAd wants to merge 29 commits into
manaflow-ai:mainfrom
AsifAd:feat/agent-status-lifecycle

Conversation

@AsifAd

@AsifAd AsifAd commented Jul 17, 2026 •

Copy link
Copy Markdown

Summary

Combines two high-impact improvements:

  1. Reliability (from upstream PR Clear agent Running status on interrupt signals #4390) — fixes stale Running after interrupt

    • Claude stop-failure hook clears Running → Idle (no false "done" notification)
    • Codex transcript monitor publishes Idle when Stop hook never fires
    • Surface-scoped running-session checks prevent cross-pane status clobbering
  2. Lifecycle clarity — explicit sidebar states

    • Successful stop → Completed (green)
    • Permission/waiting → Waiting (orange)
    • Error → Failed (red)
    • Interrupt (stop-failure) → Idle (not Completed)

Fixes #4389 (interrupt stale Running). Partially addresses #4276 and #3749 via Codex monitor fallback.

Test plan

  • Build: ./scripts/setup.sh && ./scripts/reload.sh --tag reliability --launch
  • Claude: start task → Esc interrupt → sidebar clears Running within ~1s
  • Codex: interrupt or rate-limit at prompt → Running clears via transcript monitor
  • Normal completion → green Completed pill
  • python3 tests/test_claude_wrapper_hooks.py (passes locally)
  • xcodebuild test -only-testing:cmuxTests/CLINotifyProcessIntegrationRegressionTests

Note

This PR integrates the open upstream fix from #4390 rather than reimplementing it.

Summary by CodeRabbit

  • Status Updates
    • Improved lifecycle tracking with clearer Waiting, Completed, and Failed semantics.
    • Updated sidebar/terminal indicators to consistently show Completed (green) and Waiting (orange) with correct failure handling.
    • Added support for additional lifecycle aliases and improved session-to-UI status synchronization.
    • Introduced StopFailure handling and added localized help for the cmux claude-hook command.
  • Bug Fixes
    • Prevented stale or older events from overwriting newer active statuses.
  • Tests
    • Expanded regression coverage for lifecycle parsing, stop/idle transitions, hook injection, and integration flows.

austinywang and others added 28 commits May 19, 2026 15:05
…atus-after-interrupt

# Conflicts:
#	.github/swift-file-length-budget.tsv
#	CLI/FeedEventClassifier.swift
#	CLI/cmux.swift
#	Resources/Localizable.xcstrings
#	Resources/bin/cmux-claude-wrapper
#	cmuxTests/FeedEventClassificationTests.swift
#	tests/test_bash_integration_no_done_notifications.py
#	tests/test_claude_wrapper_hooks.py
Extend AgentHibernationLifecycleState with waiting, completed, and failed;
wire generic and Claude hook stop/notification paths to emit the new pills
(Completed green, Waiting orange, Failed red) and update regression tests.
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Manaflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR expands lifecycle state handling with waiting, completed, and failed, updates hook and monitor status propagation, adds Claude StopFailure support, and revises terminal status output and persistence. Tests cover aliases, lifecycle semantics, stale events, monitor behavior, and hook integration.

Changes

Agent lifecycle status

Layer / File(s) Summary
Lifecycle contracts and workspace resolution
Sources/AgentHibernation/..., Sources/Workspace+AgentLifecycle.swift, Sources/Workspace+Todos.swift, cmuxTests/AgentHibernationTests.swift
Lifecycle parsing, derived properties, workspace precedence, task signals, and direct tests now recognize completed, waiting, and failed states.
Runtime and monitor propagation
CLI/cmux.swift
Codex monitor records, runtime mappings, lease handling, lifecycle persistence, and terminal helpers propagate idle, completed, waiting, and failed outcomes.
Hook and stop outcome handling
CLI/cmux.swift, CLI/CMUXCLI+AgentHookDefinitions.swift, CLI/FeedEventClassifier.swift, Resources/bin/cmux-claude-wrapper, Resources/Localizable.xcstrings
StopFailure hooks and telemetry are wired, while stop, completion, waiting, and error paths emit corresponding lifecycle and terminal status updates.
Regression and integration validation
cmuxTests/*, tests/*
Tests update completed and waiting expectations, verify stale-event suppression and monitor behavior, validate StopFailure integration, and improve PTY process cleanup.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Hook
  participant Monitor
  participant SessionStore
  participant Terminal
  Hook->>Monitor: report completion, waiting, failure, or stop-failure
  Monitor->>SessionStore: persist runtime status and lifecycle
  Monitor->>Terminal: publish localized status command
Loading

Possibly related issues

  • manaflow-ai/cmux-dev-artifacts#4284: Concerns the same agent lifecycle state model and terminal status propagation paths.

Possibly related PRs

Suggested reviewers: lawrencecchen


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 errors, 2 warnings)

Check name Status Explanation Resolution
Cmux Swift Package Boundaries ❌ Error AgentHibernationLifecycleState is reusable pure domain logic expanded in app-target Sources/ and shared by CLI/tests; it should live in a SwiftPM package. Extract AgentHibernationLifecycleState (parse + derived flags) into a small package target—ideally CmuxWorkspaces or CmuxCore—and import it from app/CLI/ControlSocket.
Cmux Full Internationalization ❌ Error The new cli.claude-hook.help catalog entry is missing the existing km locale, so a user-facing Swift string was added without full locale coverage. Add a km translation for cli.claude-hook.help (matching the existing supported locale set in Resources/Localizable.xcstrings) or remove km everywhere if unsupported.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description covers summary and testing, but it omits required template sections like Demo Video, Review Trigger, and Checklist. Add the missing template sections: Demo Video, Review Trigger block, and the Checklist with all items addressed.
✅ Passed checks (21 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed No new actor-isolation debt: the changed Workspace helpers remain on @MainActor, the new lifecycle types are plain Sendable value types, and CLI updates only emit socket commands.
Cmux Swift Blocking Runtime ✅ Passed Production Swift adds lifecycle/status mapping only; the PR delta shows no new semaphores, sleeps, waits, syncs, polling, or new lock primitives.
Cmux Browser Automation Off-Main ✅ Passed No browser automation routing changed; the diff only touches lifecycle/status hooks and tests, so the off-main browser-automation rule isn't implicated.
Cmux Expensive Synchronous Load ✅ Passed Changed code only remaps lifecycle/status values and reads SharedLiveAgentIndex.shared; the heavy RestorableAgentSessionIndex.load() stays in the background loader/cold-cache path.
Cmux Cache Substitution Correctness ✅ Passed No fresh authoritative read was replaced by a cache in a persistence/snapshot path; Codex status writes still read transcripts live and session-store checks live processes.
Cmux No Hacky Sleeps ✅ Passed Runtime shell diff only adds StopFailure hook wiring; no new sleeps/polls were introduced. The only sleep change is test-only scaffolding, which is allowed.
Cmux Algorithmic Complexity ✅ Passed No new asymptotic regression: changes are constant-time mappings plus existing linear session scans, without nested or per-target O(n²) rescans.
Cmux Swift Concurrency ✅ Passed Patch only updates lifecycle/status mapping and tests; no new DispatchQueue, Task, completion-handler, or Combine usage appears in the changed Swift diff.
Cmux Swift @Concurrent ✅ Passed No edited Swift path adds async actor-escape work or invalid @concurrent; the changed status helpers are synchronous UI-bound updates.
Cmux Swiftpm Lockfiles ✅ Passed PR changes touch code, tests, and workflows only; no .gitignore, Package.swift, .xcodeproj, or Package.resolved diffs, so the SwiftPM lockfile rule isn’t violated.
Cmux Swift Logging ✅ Passed Commit diff adds no print/debugPrint/dump/NSLog/Logger in touched Swift code; the only logging found is preexisting #if DEBUG file logging.
Cmux User-Facing Error Privacy ✅ Passed The diff only adds status/help copy and hook plumbing; it doesn’t expose raw upstream errors, secrets, IDs, or internal provider details in user-visible text.
Cmux Swiftui State Layout ✅ Passed No changed file introduces SwiftUI state/layout patterns; the diff is CLI/test-only and contains no new ObservableObject, GeometryReader, lazy-list, or render-time mutation usage.
Cmux Architecture Rethink ✅ Passed PR is a small invariant fix: it expands lifecycle states and remaps status ownership in Workspace/session store, with no sleeps, polling, locks, observers, or duplicate entrypoints.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed Touched Swift files only change status/lifecycle logic; no user-visible window types or cmuxAuxiliaryWindowIdentifiers/shared close-shortcut routing were altered.
Cmux Source Artifacts ✅ Passed Changed paths are source/tests/localization/scripts and a .github config TSV; no temp, build, cache, or generated artifact directories were added.
Cmux No Test Or Debug Seam In Production Source ✅ Passed Touched Sources files add normal lifecycle helpers and parsers; the only DEBUG block is a preexisting log in Workspace+AgentLifecycle, not a test seam.
Cmux No Ambient Global State ✅ Passed No new ambient globals: the PR adds instance methods and enum cases on existing types, with no new file-scope API, mutable globals, or singletons in production Swift.
Title check ✅ Passed The title is concise and accurately reflects the main changes around interrupt reliability and lifecycle state updates.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds explicit waiting, completed, and failed states to AgentHibernationLifecycleState, replacing the conflation of success with idle and errors with needsInput. All Claude and generic agent hook handlers are updated to emit the new states, with corresponding UI pills (green Completed, orange Waiting, red Failed), and the workspace aggregation priority list and sidebar signal helpers are extended to match.

  • AgentHibernationLifecycleState gains waiting, completed, failed with parsing aliases and updated allowsHibernation / needsUserAttention semantics; workspace aggregation now prioritises failed > waiting > needsInput > completed > unknown > idle.
  • Claude hook stop emits completed lifecycle + green checkmark pill; stop-failure emits idle + gray pill; permission/error notifications emit waiting/failed with orange/red pills.
  • Generic hook handlers share the updated terminal-status logic; hasRunningSession now also counts needsInput sessions when a surface is specified, preventing a completing session from clobbering a waiting sibling.
  • The Codex monitor path adds publishCodexMonitorIdle with lease-retirement and stale-session guards; regression tests cover new lifecycle values, StopFailure hook wiring, and the Codex monitor idle/shared-status scenarios.

Confidence Score: 4/5

Safe to merge with one minor fix: a dead code branch in agentHookRuntimeStatus that returns .idle instead of .completed, inconsistent with the generic handler updated in the same PR.

The lifecycle model change is coherent and well-tested. The hasRunningSession extension to include needsInput sessions when a surface is specified correctly prevents Completed from overwriting Waiting. The only gap is the new private agentHookRuntimeStatus function whose .idle branch is unreachable but would produce wrong session-store data if ever reached.

CLI/cmux.swift — agentHookRuntimeStatus(for:) .idle case. Also cmuxTests/WorkspaceRemoteConnectionTests.swift where a Completed + pause.circle.fill icon conjunction was noted in a prior review thread.

Important Files Changed

Filename Overview
Sources/AgentHibernation/AgentHibernationLifecycleState.swift Adds waiting/completed/failed cases with correct allowsHibernation, isActivelyRunning, and needsUserAttention semantics; parsing aliases handled cleanly.
CLI/cmux.swift Claude/Codex hook handlers updated to emit new lifecycle states; new private agentHookRuntimeStatus helper has a dead .idle branch returning .idle instead of .completed, inconsistent with the generic handler.
Sources/Workspace+AgentLifecycle.swift Workspace state aggregation correctly inserts failed > waiting > completed in priority order; existing needsInput kept for backward compat.
Sources/Workspace+Todos.swift Sidebar signal checks switched to needsUserAttention / isActivelyRunning helpers, correctly capturing waiting, needsInput, and failed states.
Resources/Localizable.xcstrings Adds cli.claude-hook.help for all supported locales; agent.generic.status.completed key is absent (previously flagged).
Resources/bin/cmux-claude-wrapper StopFailure hook correctly wired to stop-failure subcommand; HOOKS_JSON validated by new regression test.
cmuxTests/WorkspaceRemoteConnectionTests.swift New monitor tests added; pre-existing Completed + pause.circle.fill icon mismatch was flagged in a prior review thread.
cmuxTests/CLINotifyProcessIntegrationRegressionTests.swift Comprehensive regression tests added for StopFailure wiring, waiting lifecycle, and Codex monitor idle/shared-status scenarios.
tests/test_bash_integration_no_done_notifications.py _wait_or_terminate refactored to graceful SIGTERM/SIGKILL with polling; test-only scaffolding, passes runtime-no-hacky-sleeps rule.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Claude hook fires] --> B{subcommand?}
    B -->|stop| C{hasPendingBackgroundWork?}
    B -->|stop-failure| D[lifecycleAfterTurn = .idle / Gray pill]
    B -->|notification| E{notificationStatus?}
    C -->|yes| F[lifecycleAfterTurn = .running]
    C -->|no| G[lifecycleAfterTurn = .completed / Green pill]
    E -->|.idle| H[lifecycle = .completed]
    E -->|.needsInput| I[lifecycle = .waiting / Orange]
    E -->|.error| J[lifecycle = .failed / Red]
    K[Generic agent hook] --> L{stopNotificationStatus?}
    L -->|.idle| M[.completed]
    L -->|.needsInput| N[.waiting]
    L -->|.error| O[.failed]
    P[Workspace aggregation priority] --> Q[running > failed > waiting > needsInput > completed > unknown > idle]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Claude hook fires] --> B{subcommand?}
    B -->|stop| C{hasPendingBackgroundWork?}
    B -->|stop-failure| D[lifecycleAfterTurn = .idle / Gray pill]
    B -->|notification| E{notificationStatus?}
    C -->|yes| F[lifecycleAfterTurn = .running]
    C -->|no| G[lifecycleAfterTurn = .completed / Green pill]
    E -->|.idle| H[lifecycle = .completed]
    E -->|.needsInput| I[lifecycle = .waiting / Orange]
    E -->|.error| J[lifecycle = .failed / Red]
    K[Generic agent hook] --> L{stopNotificationStatus?}
    L -->|.idle| M[.completed]
    L -->|.needsInput| N[.waiting]
    L -->|.error| O[.failed]
    P[Workspace aggregation priority] --> Q[running > failed > waiting > needsInput > completed > unknown > idle]
Loading

Reviews (2): Last reviewed commit: "merge: integrate PR #4390 reliability fi..." | Re-trigger Greptile

Comment thread CLI/cmux.swift
@@ -24225,9 +24227,9 @@ struct CMUXCLI {
client: client,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing xcstrings entry for agent.generic.status.completed

The key "agent.generic.status.completed" used here does not exist in Resources/Localizable.xcstrings. For non-English locales (at minimum Japanese is supported, with key "agent.generic.notification.subtitle.completed" → "完了"), String(localized:defaultValue:) will silently fall back to the English "Completed" string. There is already a translated key "agent.generic.notification.subtitle.completed" with the same English/Japanese values that could be reused, or a new "agent.generic.status.completed" entry with translations needs to be added to the catalog.

Rule Used: Flag production user-facing text that is not fully... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

…lish

Cherry-pick upstream interrupt/Codex-monitor work (stop-failure hook,
recordCodexMonitorIdleIfCurrent, surface-scoped running checks). Fix
stop-failure to clear Running to Idle instead of Completed.
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

@AsifAd AsifAd changed the title Add explicit agent status lifecycle (completed/waiting/failed) Agent status reliability: interrupt fix + lifecycle states Jul 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
CLI/cmux.swift (1)

31752-31767: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Waiting pill color is inconsistent with the new orange standard.

This .needsInput? notification branch now drives agentLifecycle = .waiting, but the pill still uses --color=#4C8DFF`` (blue). Every other waiting/needs-input pill in this PR moved to orange #FF9500 (Claude notify Line 24549, prompt-submit restore Line 30810, stop-waiting Line 31396). Per the PR objective ("waiting notifications display orange Waiting"), this path is now the outlier.

🎨 Align the waiting pill color
-                    "set_status \(def.statusKey) \(statusValue) --icon=bell.fill --color=`#4C8DFF` --priority=100 --tab=\(workspaceId)\(socketPanelOption(surfaceId))",
+                    "set_status \(def.statusKey) \(statusValue) --icon=bell.fill --color=`#FF9500` --priority=100 --tab=\(workspaceId)\(socketPanelOption(surfaceId))",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLI/cmux.swift` around lines 31752 - 31767, Update the `.needsInput?`
branch’s `sendV1Command` status color from blue `#4C8DFF` to the standard
waiting orange `#FF9500`, while preserving its existing lifecycle, icon,
priority, and tab parameters.
cmuxTests/WorkspaceRemoteConnectionTests.swift (1)

4778-4782: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update stale Idle failure messages.

These assertions now expect Completed, but their failure messages still say Idle, which makes failures misleading during triage.

Proposed fix
-            "Expected successful Codex turn to report Idle, saw \(state.commands)"
+            "Expected successful Codex turn to report Completed, saw \(state.commands)"

-            "Expected scoped assistant reply to suppress no-final-response error, saw \(state.commands)"
+            "Expected scoped assistant reply to report Completed and suppress no-final-response error, saw \(state.commands)"

-            "Expected stale unscoped error to leave Codex idle, saw \(state.commands)"
+            "Expected stale unscoped error to leave Codex Completed, saw \(state.commands)"

Also applies to: 5004-5007, 5074-5077

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmuxTests/WorkspaceRemoteConnectionTests.swift` around lines 4778 - 4782,
Update the failure messages for the assertions near the successful Codex turn
checks, including the corresponding cases near lines 5004–5007 and 5074–5077, to
say “Completed” instead of “Idle” so they match the expected status.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CLI/cmux.swift`:
- Around line 24230-24232: Add the missing agent.generic.status.completed entry
to the Localizable.xcstrings string catalog, using “Completed” as its
default/localized value so the status configuration in CLI/cmux.swift resolves
through the catalog.

---

Outside diff comments:
In `@CLI/cmux.swift`:
- Around line 31752-31767: Update the `.needsInput?` branch’s `sendV1Command`
status color from blue `#4C8DFF` to the standard waiting orange `#FF9500`, while
preserving its existing lifecycle, icon, priority, and tab parameters.

In `@cmuxTests/WorkspaceRemoteConnectionTests.swift`:
- Around line 4778-4782: Update the failure messages for the assertions near the
successful Codex turn checks, including the corresponding cases near lines
5004–5007 and 5074–5077, to say “Completed” instead of “Idle” so they match the
expected status.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e71e6ff0-b698-415d-9cc8-570dd906a918

📥 Commits

Reviewing files that changed from the base of the PR and between b984c9d and 03113d3.

📒 Files selected for processing (11)
  • CLI/cmux.swift
  • Sources/AgentHibernation/AgentHibernationLifecycleState.swift
  • Sources/Workspace+AgentLifecycle.swift
  • Sources/Workspace+Todos.swift
  • cmuxTests/AgentHibernationTests.swift
  • cmuxTests/CLICodexHookTimeoutRegressionTests.swift
  • cmuxTests/CLIGenericHookPersistenceTests.swift
  • cmuxTests/CLINotifyProcessIntegrationRegressionTests.swift
  • cmuxTests/ClaudeBackgroundWorkNotifyTests.swift
  • cmuxTests/ClaudeHookLiveDeliveryTargetTests.swift
  • cmuxTests/WorkspaceRemoteConnectionTests.swift

Comment thread CLI/cmux.swift
Comment on lines +24230 to +24232
value: String(localized: "agent.generic.status.completed", defaultValue: "Completed"),
icon: "checkmark.circle.fill",
color: "#34C759"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the new localization key exists across catalogs
rg -n "agent.generic.status.completed" --glob '*.xcstrings' -C1

Repository: manaflow-ai/cmux

Length of output: 154


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate string catalogs and inspect whether the new key exists anywhere.
printf '\n== catalogs ==\n'
fd -a '\.xcstrings$' . || true

printf '\n== key search ==\n'
rg -n --glob '*.xcstrings' 'agent\.generic\.status\.completed|Completed' . || true

printf '\n== locale markers in catalogs ==\n'
python3 - <<'PY'
import json, glob, os
for path in glob.glob('**/*.xcstrings', recursive=True):
    try:
        with open(path, 'r', encoding='utf-8') as f:
            data = json.load(f)
    except Exception as e:
        print(f'{path}: ERROR {e}')
        continue
    print(f'\n{path}')
    print(' localizations:', sorted(data.get('sourceLanguage', '') and [data.get('sourceLanguage')] or []))
    strings = data.get('strings', {})
    if 'agent.generic.status.completed' in strings:
        print(' has_key: yes')
        entry = strings['agent.generic.status.completed']
        print(' entry keys:', sorted(entry.keys()))
        locs = entry.get('localizations', {})
        print(' localized locales:', sorted(locs.keys()))
    else:
        print(' has_key: no')
PY

Repository: manaflow-ai/cmux

Length of output: 4320


Add agent.generic.status.completed to Resources/Localizable.xcstrings
CLI/cmux.swift:24230-24232 uses a localized status key, but the key isn’t present in the string catalog, so it falls back to the inline defaultValue instead of a catalog entry.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLI/cmux.swift` around lines 24230 - 24232, Add the missing
agent.generic.status.completed entry to the Localizable.xcstrings string
catalog, using “Completed” as its default/localized value so the status
configuration in CLI/cmux.swift resolves through the catalog.

Source: Path instructions

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs a call Finished and held for a team design or product decision (see #13742 and the gallery in #15427)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar 'Running' status stays on after user interrupts an agent turn

4 participants