Skip to content

feat(cli): add interactive REPL mode#14

Merged
JacobFV merged 3 commits intomainfrom
feat/interactive-mode
Feb 10, 2026
Merged

feat(cli): add interactive REPL mode#14
JacobFV merged 3 commits intomainfrom
feat/interactive-mode

Conversation

@JacobFV
Copy link
Copy Markdown
Contributor

@JacobFV JacobFV commented Feb 10, 2026

Summary

  • Run agi with no arguments to enter interactive mode — type tasks one after another in a REPL loop
  • Running agi "some task" now returns to the input prompt on completion instead of exiting
  • Events persist across tasks with separator dividers marking task boundaries
  • Ctrl+C exits from both input and execution states

Changes

  • src/cli.ts — goal positional is now optional ([goal] instead of <goal>)
  • src/index.tsx — removed goal-required error gate
  • src/components/PromptInput.tsx — new REPL input component
  • src/components/EventDisplay.tsx — added separator event type for task boundaries
  • src/hooks/useAgent.ts — driver cleanup/restart support, onFinishedRef to avoid stale closures
  • src/app/App.tsx — phase state machine (input | executing) replacing one-shot lifecycle

Test plan

  • agi "test task" — executes then shows input prompt (not exit)
  • agi — shows interactive mode header and input prompt immediately
  • Type a task in input prompt, verify it executes and returns to input
  • Verify Ctrl+C exits from both input and execution states
  • Verify space/q keybindings work during execution but not during input
  • npm run typecheck passes
  • npm run build passes

🤖 Generated with Claude Code

JacobFV and others added 3 commits February 9, 2026 23:43
Run `agi` without arguments to enter an interactive loop where you can
type tasks one after another. With a goal argument the task starts
immediately but returns to the prompt on completion instead of exiting.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Action type + coords stay bold white, params render in gray for visual
hierarchy: `▸ type "echo hello world"` / `▸ hotkey [Enter]`

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@JacobFV JacobFV merged commit 09e6871 into main Feb 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant