MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / composeHeadlessCommand

Function composeHeadlessCommand

src/workspaces/adapters/codex.ts:105–119  ·  view source on GitHub ↗
(_base: readonly string[], _ctx: SpawnContext, prompt: string)

Source from the content-addressed store, hash-verified

103 // No mcp_servers head (interactive composeCommand keeps it — MCP works there
104 // with a human approver). `--` terminates options before the trailing prompt.
105 composeHeadlessCommand(_base: readonly string[], _ctx: SpawnContext, prompt: string): readonly string[] {
106 return [
107 'codex',
108 '-c',
109 'approval_policy="never"',
110 '-c',
111 'sandbox_mode="workspace-write"',
112 '-c',
113 'sandbox_workspace_write.network_access=true',
114 'exec',
115 '--json',
116 '--',
117 prompt,
118 ];
119 },
120
121 // `codex exec --json` line 1 is `{"type":"thread.started","thread_id":…}`;
122 // the thread_id EQUALS the rollout's `session_meta.id` (verified 0.137.0,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected