Skip to content

Add exact/minimal prompt profiles for non-code agents #93

@shiny-code-bot

Description

@shiny-code-bot

Objective

Add a first-class way for the primary agent to spawn a non-code subagent whose model-visible behavioral prompt is intentionally isolated from Codex's default coding-agent identity, repo posture, and delegation scaffolding.

The motivating use case is website prose and other human-feeling creative/editorial work. Previous attempts to add enough instruction on top of the default Codex prompt, or remove enough instruction through existing config, still produced output that sounded like a programmer imitating copy. The feature should let the parent agent ask for a genuinely different kind of collaborator: copywriter, editor, brand strategist, UX writer, critic, or other non-code role.

This should be designed against the current codex-lab architecture at implementation time. codex-lab is a moving target, so the work should begin by re-investigating the live prompt assembly, role config, tool exposure, AGENTS.md injection, and multi-agent paths rather than hardcoding assumptions from this issue.

Finish Line

The primary agent can spawn a subagent with a minimal/exact prompt profile that uses a caller-provided or curated non-code prompt as the main behavioral instruction, without inheriting Codex's coding-agent defaults unless explicitly requested.

Current Status

State: Active
Next action: Investigate the current prompt assembly and agent role flow, then propose the smallest implementation shape for exact/minimal prompt subagents.
Blocked by: None
Last verified: 2026-06-15 on branch add-agent-session-env-reader

Scope

  • In: A prompt isolation mechanism for spawned agents, likely exposed through agent role/profile configuration and/or spawn-time options.
  • In: A minimal/exact profile that strips Codex coding identity, repo/project context, environment context, skills/tools prose, and multi-agent teamwork guidance unless the selected profile asks for them.
  • In: Curated non-code role prompts for common prose workflows such as copywriter, editor, brand strategist, UX writer, and critic.
  • In: Tests that inspect model-visible context so this does not regress silently as prompt assembly changes.
  • Out: Replacing the default Codex coding-agent behavior.
  • Out: Weakening mandatory platform/system safety policy.
  • Out: Hardcoding today’s prompt internals into public docs or long-lived assumptions without verifying the current architecture during implementation.

Acceptance Criteria

  • The implementation starts with a fresh audit of current prompt construction for root agents, spawned agents, role config overlays, AGENTS.md/user instructions, environment context, skills/plugins, and multi-agent v2 usage hints.
  • A spawned agent can opt into a minimal/exact prompt profile where Codex coding defaults are not injected as behavioral instructions.
  • The parent agent can provide a full replacement behavioral prompt for that spawned agent.
  • Curated non-code roles are available for at least: copywriter, editor, brand strategist, UX writer, and critic.
  • Non-code roles leave enough room for the subagent to investigate, research, ask clarifying questions, and find the right way instead of following stale or over-specific prompt lore.
  • The profile can opt out of project instructions such as AGENTS.md, environment context, skill instructions, plugin instructions, apps instructions, permissions instructions, and multi-agent usage hints where those blocks would contaminate non-code output.
  • Tool exposure is deliberate for minimal/exact agents: either disabled, sharply limited, or included only when the chosen role/profile asks for research or inspection capability.
  • Tests assert that a minimal/exact non-code spawned agent’s model-visible context does not contain coding/delegation scaffolding such as the default Codex coding identity or multi-agent team prompt.
  • Tests also cover a research-capable non-code role so the feature does not become too sterile to discover the right prose direction.

Relationships

  • Durable MVP planning recovery point: Codex Lab MVP dogfood plan #28
  • Related code areas to verify during implementation: prompt/context assembly, agent role config, spawn-agent tool handling, config layering, and any app-server protocol surface that exposes agent spawn options.

Validation

  • Add focused Rust tests for prompt/context assembly around spawned agents using the current repo test helpers.
  • If app-server protocol or schema changes are needed, regenerate and test the protocol/schema fixtures according to repo guidance.
  • If TUI/app-visible text or role listings change, include the required snapshot coverage.
  • Run scoped just test -p <changed-crate> for affected crates, and just fmt after code changes.

Decisions

  • Treat this as prompt isolation/non-code agent profiles, not merely another appended role prompt.
  • "Exact" means no removable Codex coding defaults or project-context injection; it does not mean bypassing non-removable platform/system policy.
  • Curated prompts should be useful defaults, but spawn-time caller-provided prompts should remain possible for one-off creative roles.

Open Questions

  • Should the spawn API expose this as prompt_profile, instruction_mode, agent_profile, or another name?
  • Should minimal/exact agents have tools disabled by default, or should curated roles choose between no_tools, research_tools, and repo_tools?
  • Should AGENTS.md be opt-in per role/profile, or should exact prompt mode always suppress it?
  • Should curated prompts live in built-in role config, external prompt templates, or a separate non-code role registry?
  • How should the UI communicate that an agent is intentionally non-code so the parent does not expect code edits from it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    planDurable planning issueplan:activePlan is actionable now

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions