agent-orchestrator/packages/plugins
prateek 91dd7cc15f
fix: keep Claude Code interactive after initial prompt (#145)
* fix: keep Claude Code interactive after initial prompt

Claude Code's -p flag runs in one-shot mode (exits after responding),
which prevents follow-up messages via `ao send`. Instead, launch Claude
interactively and deliver the initial prompt post-launch via
runtime.sendMessage().

Adds `promptDelivery` property to the Agent interface so each agent
plugin can declare whether prompts should be inlined in the launch
command or sent after the agent starts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: make post-launch prompt delivery non-fatal and add test coverage

- Move sendMessage call outside the try/catch that destroys the session.
  A prompt delivery failure should not kill a running agent — user can
  retry with `ao send`.
- Add tests: no-prompt + post-launch agent, sendMessage failure resilience,
  5s delay verification, systemPrompt/systemPromptFile alongside omitted -p.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add integration test for prompt delivery (proves bug and fix)

Two real-Claude integration tests that contrast:
1. `-p` mode: Claude exits after responding (the bug)
2. Interactive + sendMessage: Claude stays alive, follow-up works (the fix)

Runs in CI with ANTHROPIC_API_KEY. Skips when prerequisites missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(test): skip interactive test without auth, improve TUI readiness detection

The integration test failed in CI because interactive Claude requires
full login auth (not just ANTHROPIC_API_KEY). Skip the interactive suite
when `claude auth status` reports not logged in.

Also fix local flakiness: replace blind 5s sleep with polling for
Claude's TUI prompt character (❯) before sending the first message,
and increase scrollback capture from 200 to 500 lines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(test): skip interactive test in CI, fix TUI readiness detection

The interactive test ran in CI despite hasInteractiveAuth() — Claude
reports logged in when ANTHROPIC_API_KEY is set, but interactive mode
requires OAuth. Use `!process.env.CI` as the skip condition instead.

Also fix waitForTuiReady false positive: the OAuth screen's
"Paste code here if prompted >" matched the `>` regex. Now checks
the last non-empty line for Claude's specific ❯ prompt character,
and bails early if the OAuth/login screen is detected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 18:11:06 +05:30
..
agent-aider feat(web): redesign dashboard, session detail, and orchestrator terminal (#125) 2026-02-20 18:43:57 +05:30
agent-claude-code fix: keep Claude Code interactive after initial prompt (#145) 2026-02-27 18:11:06 +05:30
agent-codex perf(agent-codex): cache findCodexSessionFile to avoid double scan 2026-02-25 16:25:24 +05:30
agent-opencode feat(web): redesign dashboard, session detail, and orchestrator terminal (#125) 2026-02-20 18:43:57 +05:30
notifier-composio feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
notifier-desktop feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
notifier-slack feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
notifier-webhook feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
runtime-process feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
runtime-tmux feat: first-class orchestrator session + file-based system prompt (#101) 2026-02-18 19:32:35 +05:30
scm-github fix: migrate to hash-based project isolation architecture 2026-02-18 00:19:55 +05:30
terminal-iterm2 feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
terminal-web feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
tracker-github feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
tracker-linear feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
workspace-clone fix: destroy old runtime before restore, cleanup clone on failure (#109) 2026-02-19 01:35:49 +05:30
workspace-worktree feat: implement session restore for crashed/exited agents (#104) 2026-02-19 01:12:57 +05:30