feat(cli): Add local agent chat#593
Merged
Merged
Conversation
Add a local Junior chat command and runner so agent turns can be exercised without Slack. The local path uses a first-class local destination, stable workspace-scoped conversation ids, and the shared reply generator while keeping plugin dispatch and scheduler surfaces Slack-only. Document the local flow in specs and public CLI docs, and cover the CLI, destination contract, local conversation ids, local runner, and dispatch narrowing with focused tests. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Keep interactive local chat sessions open after ordinary turn failures, while still treating terminal output failures as delivery errors. Require an explicit local delivery port before the runner can commit assistant state. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Allow --once messages to contain flag-like text and load durable Pi projection for local turns. Keep delivered local replies out of the failed-turn path if final state persistence fails after terminal delivery. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Reject local file replies until local file output exists, keep local conversation ids out of Slack thread correlation, and allow --conversation to appear after --once message text. Update the local specs and docs to match the implemented contracts. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Reset the local Pi projection to the pre-run state when terminal delivery fails after generation. This keeps durable local follow-up history aligned with the visible delivery contract. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Rollback local artifacts, sandbox metadata, and Pi projection when generation succeeds but terminal delivery fails. This keeps durable follow-up state aligned with the visible local delivery contract. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Force the CLI entrypoints to exit with the dispatcher result code after a command completes. This keeps one-shot local chat validation from hanging on provider or tracing handles after delivery succeeds. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Document the local agent as the first manual behavior check for non-Slack-specific changes. Link the runbook from the CLI docs, testing docs, sidebar, and AGENTS.md so contributors and coding agents use the same workflow. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Document apps/example as the canonical local validation app for monorepo work. Add concrete local agent checks for the app-local skill and plugin-bundled example skill. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Narrow the local agent validation runbook to environment-backed credential checks. User-bound OAuth and credential issuance flows still require Slack or deployed OAuth validation because local chat runs as the local-cli system actor with authorization prompts disabled. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Clarify that the first local CLI path uses a direct local runner rather than durable inbound-message mailbox records. Keep mailbox-backed local source routing as the future platform-ingress contract. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Validate local conversation ids before the runner crosses into shared reply generation. Keep the CLI delivery port on a local reply projection and return only the local outcome from the runner. Align the chat architecture spec with the first-pass direct local runner path. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Strip Node's leading argv separator before dispatching CLI commands while preserving command-level flags. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Carry the finalized Pi transcript on assistant replies so the local runner can commit it only after local delivery succeeds. Persist the same messages into local conversation state for the legacy fallback path. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Use -p for one-shot local prompts and create a fresh local conversation for every CLI invocation. Keep multi-turn continuity scoped to the running interactive process instead of exposing named local conversations. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Remove stale named-conversation and default-history surfaces from the local chat CLI. Strengthen tests so prompt invocations use fresh conversations while interactive prompts share one process-scoped conversation. Co-Authored-By: GPT-5 Codex <codex@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2d435e4. Configure here.
Use conversation Pi history when the session-log projection is stale for a local turn. This keeps follow-up local prompts aligned with the newest persisted conversation state if session-log commit fails after delivery state persists. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Make local and Slack agent turns share the core reply path through explicit destination and requester contracts. Move Slack-only plugin hook data under ctx.slack and derive Slack tool context from the typed destination. Update specs, generated API docs, and focused tests for the stronger local-vs-Slack boundary. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Move Slack-specific tool state behind a SlackToolContext derived from the typed destination and requester. Keep local tool contexts free of Slack hints while preserving runtime-owned Slack delivery metadata for Slack turns. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Make local chat default to memory unless a state adapter is selected explicitly, so REDIS_URL in the repo environment does not couple local QA to Redis. Carry source/requestor context through shared agent and plugin tool paths while keeping Slack-specific context inside Slack tool boundaries. Add the junior-qa agent skill to document local CLI QA through apps/example. Co-Authored-By: GPT-5 Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Junior can now run real agent turns from the terminal with
junior chat:-pexits after one message, interactive mode keeps one process-scoped conversation, and local chat defaults to memory unlessJUNIOR_STATE_ADAPTERis explicitly selected. That keeps ordinary local QA from inheriting Redis just because.env.localcontainsREDIS_URL, while still allowing durable state to be opted into deliberately.This also tightens platform boundaries for future non-Slack ingress. Source/requestor context is generic through the shared agent path, Slack tool runtime context is derived only inside Slack-specific tools, and scheduler/plugin dispatch records keep Slack-only destinations where the feature is Slack-only.
apps/exampleis now documented as the local QA fixture through the newjunior-qaagent skill, with specs and focused tests covering the local-vs-Slack contracts.